LicenseKey

Namespace: ServiceStack.Text
We found 10 examples in language CSharp for this search. You will see 47 fragments of code.

Other methods

        public static string Value()
        {
            if (string.IsNullOrEmpty(LicenseKey.fingerPrint))
            {
                LicenseKey.fingerPrint = LicenseKey.GetHash(string.Concat(new string[]
				{
					"\nBIOS >> ", 
					LicenseKey.biosId(), 
					"\nBASE >> ", 
					LicenseKey.baseId(), 
					"\nDISK >> ", 
					LicenseKey.diskId()
				}));
            }
            return LicenseKey.fingerPrint;
        }
        private static string GetHash(string s)
        {
            MD5 mD = new MD5CryptoServiceProvider();
            ASCIIEncoding aSCIIEncoding = new ASCIIEncoding();
            byte[] bytes = aSCIIEncoding.GetBytes(s);
            return LicenseKey.GetHexString(mD.ComputeHash(bytes));
        }
        private static string biosId()
        {
            return string.Concat(new string[]
			{
				LicenseKey.identifier("Win32_BIOS", "Manufacturer"), 
				LicenseKey.identifier("Win32_BIOS", "SMBIOSBIOSVersion"), 
				LicenseKey.identifier("Win32_BIOS", "IdentificationCode"), 
				LicenseKey.identifier("Win32_BIOS", "SerialNumber"), 
				LicenseKey.identifier("Win32_BIOS", "ReleaseDate"), 
				LicenseKey.identifier("Win32_BIOS", "Version")
			});
        }
        private static string diskId()
        {
            return LicenseKey.identifier("Win32_DiskDrive", "Model") + LicenseKey.identifier("Win32_DiskDrive", "Manufacturer") + LicenseKey.identifier("Win32_DiskDrive", "Signature") + LicenseKey.identifier("Win32_DiskDrive", "TotalHeads");
        }
        private static string baseId()
        {
            return LicenseKey.identifier("Win32_BaseBoard", "Model") + LicenseKey.identifier("Win32_BaseBoard", "Manufacturer") + LicenseKey.identifier("Win32_BaseBoard", "Name") + LicenseKey.identifier("Win32_BaseBoard", "SerialNumber");
        }
        private static string videoId()
        {
            return LicenseKey.identifier("Win32_VideoController", "DriverVersion") + LicenseKey.identifier("Win32_VideoController", "Name");
        }

        
        public System.Threading.Tasks.Task<string[]> ReturnSoundFileIDsAsync(string LicenseKey)
        {
            return base.Channel.ReturnSoundFileIDsAsync(LicenseKey);
        }
        
        public System.Threading.Tasks.Task<bool> RemoveSoundFileAsync(string SoundFileID, string LicenseKey)
        {
            return base.Channel.RemoveSoundFileAsync(SoundFileID, LicenseKey);
        }
        
        public System.Threading.Tasks.Task<bool> RenameSoundFileAsync(string SoundFileID, string NewSoundFileID, string LicenseKey)
        {
            return base.Channel.RenameSoundFileAsync(SoundFileID, NewSoundFileID, LicenseKey);
        }
        
        public System.Threading.Tasks.Task<double> GetSoundFileLengthAsync(string SoundFileID, string LicenseKey)
        {
            return base.Channel.GetSoundFileLengthAsync(SoundFileID, LicenseKey);
        }
        
        public System.Threading.Tasks.Task<PhoneNotifySoapService.GetSoundFileResponse> GetSoundFileAsync(string SoundFileID, string LicenseKey)
        {
            PhoneNotifySoapService.GetSoundFileRequest inValue = new PhoneNotifySoapService.GetSoundFileRequest();
            inValue.SoundFileID = SoundFileID;
            inValue.LicenseKey = LicenseKey;
            return ((PhoneNotifySoapService.PhoneNotifySoap)(this)).GetSoundFileAsync(inValue);
        }
        
        public System.Threading.Tasks.Task<string> GetSoundFileURLAsync(string SoundFileID, string LicenseKey)
        {
            return base.Channel.GetSoundFileURLAsync(SoundFileID, LicenseKey);
        }

        
        public System.Threading.Tasks.Task<string[]> ReturnSoundFileIDsAsync(string LicenseKey)
        {
            return base.Channel.ReturnSoundFileIDsAsync(LicenseKey);
        }
        
        public System.Threading.Tasks.Task<bool> RemoveSoundFileAsync(string SoundFileID, string LicenseKey)
        {
            return base.Channel.RemoveSoundFileAsync(SoundFileID, LicenseKey);
        }
        
        public System.Threading.Tasks.Task<bool> RenameSoundFileAsync(string SoundFileID, string NewSoundFileID, string LicenseKey)
        {
            return base.Channel.RenameSoundFileAsync(SoundFileID, NewSoundFileID, LicenseKey);
        }
        
        public System.Threading.Tasks.Task<double> GetSoundFileLengthAsync(string SoundFileID, string LicenseKey)
        {
            return base.Channel.GetSoundFileLengthAsync(SoundFileID, LicenseKey);
        }
        
        public System.Threading.Tasks.Task<PhoneNotifySoap.GetSoundFileResponse> GetSoundFileAsync(string SoundFileID, string LicenseKey)
        {
            PhoneNotifySoap.GetSoundFileRequest inValue = new PhoneNotifySoap.GetSoundFileRequest();
            inValue.SoundFileID = SoundFileID;
            inValue.LicenseKey = LicenseKey;
            return ((PhoneNotifySoap.PhoneNotifySoap)(this)).GetSoundFileAsync(inValue);
        }
        
        public System.Threading.Tasks.Task<string> GetSoundFileURLAsync(string SoundFileID, string LicenseKey)
        {
            return base.Channel.GetSoundFileURLAsync(SoundFileID, LicenseKey);
        }

        public static UploadSoundFileRequest PrepareUploadSoundFileSoapRequest(UploadSoundFileRequestBody requestBody, string licenseKey)
        {
            return new UploadSoundFileRequest(requestBody.FileBinary, requestBody.SoundFileID, licenseKey);
        }

        public static GetSoundFileRequest PrepareGetSoundFileSoapRequest(string soundFileId, string licenseKey)
        {
            return new GetSoundFileRequest(soundFileId, licenseKey);
        }

        public static GetSoundFileInMP3Request PrepareGetSoundFileInMP3SoapRequest(string soundFileId, int bitRate, string licenseKey)
        {
            return new GetSoundFileInMP3Request(soundFileId, bitRate, licenseKey);
        }

        public static GetSoundFileInUlawRequest PrepareGetSoundFileInUlawSoapRequest(string soundFileId, string licenseKey)
        {
            return new GetSoundFileInUlawRequest(soundFileId, licenseKey);
        }

        public static GetTTSInMP3Request PrepareGetTTSInMP3SoapRequest(GetTTSInMP3RequestBody requestBody, string licenseKey)
        {
            return new GetTTSInMP3Request(requestBody.TextToSay, requestBody.VoiceID, requestBody.BitRate, requestBody.TTSrate, requestBody.TTSvolume, licenseKey);
        }

        public static GetTTSInULAWRequest PrepareGetTTSInULAWSoapRequest(GetTTSInULAWRequestBody requestBody, string licenseKey)
        {
            return new GetTTSInULAWRequest(requestBody.TextToSay, requestBody.VoiceID, requestBody.TTSrate, requestBody.TTSvolume, licenseKey);
        }


		internal static ILicenseProvider CreateInstance()
		{
			try
			{
				// check for a license provider extension
				return (ILicenseProvider) new LicenseProviderExtensionPoint().CreateExtension();
			}
			catch (NotSupportedException)
			{
				return new LocalLicenseProvider();
			}
		}
			public void GetLicenseInfo(out string licenseKey, out string machineId)
			{
				licenseKey = ApplicationSettingsExtensions.GetSharedPropertyValue(new LicenseSettings(), "LicenseKey").ToString();
				machineId = EnvironmentUtilities.MachineIdentifier;
			}

			public void SetLicenseInfo(string licenseKey)
			{
				var oldLicenseKey = ApplicationSettingsExtensions.GetSharedPropertyValue(new LicenseSettings(), "LicenseKey").ToString();
				ApplicationSettingsExtensions.SetSharedPropertyValue(new LicenseSettings(), "LicenseKey", licenseKey);

				if (oldLicenseKey != licenseKey)
					EventsHelper.Fire(LicenseInfoChanged, this, new EventArgs());
			}


        [HttpGet("GetQueueIDStatus")]
        [ProducesResponseType(typeof(NotifyReturn), StatusCodes.Status200OK)]
        public async Task<ActionResult<NotifyReturn>> GetQueueIDStatus([Required, FromQuery] long queueId)
        {
            return Ok(await _client.GetQueueIDStatusAsync(queueId));
        }

        [HttpGet("GetQueueIDStatusWithAdvancedInfo")]
        [ProducesResponseType(typeof(NotifyReturn), StatusCodes.Status200OK)]
        [ProducesResponseType(typeof(ErrorDetails), StatusCodes.Status400BadRequest)]
        public async Task<ActionResult<NotifyReturn>> GetQueueIDStatusWithAdvancedInfo([Required, FromQuery] long queueId)
        {
            string licenseKey = (string)HttpContext.Items[Constants.RequestParameters.LicenseKey];
            if (!InputParametersValidator.IsValidGuidFormat(licenseKey))
            {
                return BadRequest(ErrorDetails.InvalidLicenseKeyFormat);
            }

            return Ok(await _client.GetQueueIDStatusWithAdvancedInfoAsync(queueId, licenseKey));
        }

        [HttpGet("GetQueueIDStatusesByPhoneNumber")]
        [ProducesResponseType(typeof(NotifyReturn[]), StatusCodes.Status200OK)]
        [ProducesResponseType(typeof(ErrorDetails), StatusCodes.Status400BadRequest)]
        public async Task<ActionResult<NotifyReturn[]>> GetQueueIDStatusesByPhoneNumber([Required, FromQuery] string phoneNumber)
        {
            string licenseKey = (string)HttpContext.Items[Constants.RequestParameters.LicenseKey];
            if (!InputParametersValidator.IsValidGuidFormat(licenseKey))
            {
                return BadRequest(ErrorDetails.InvalidLicenseKeyFormat);
            }

            return Ok(await _client.GetQueueIDStatusesByPhoneNumberAsync(phoneNumber, licenseKey));
        }

        [HttpGet("GetMultipleQueueIdStatus")]
        [ProducesResponseType(typeof(NotifyReturn[]), StatusCodes.Status200OK)]
        [ProducesResponseType(typeof(ErrorDetails), StatusCodes.Status400BadRequest)]
        public async Task<ActionResult<NotifyReturn[]>> GetMultipleQueueIdStatus([Required, FromQuery] string queueIds)
        {
            string licenseKey = (string)HttpContext.Items[Constants.RequestParameters.LicenseKey];
            if (!InputParametersValidator.IsValidGuidFormat(licenseKey))
            {
                return BadRequest(ErrorDetails.InvalidLicenseKeyFormat);
            }
            if (!InputParametersValidator.IsValidMultipleValuesSeparatedWithSemicolonParameterFormat(queueIds))
            {
                return BadRequest(ErrorDetails.InvalidQueueIDsFormat);
            }

            return Ok(await _client.GetMultipleQueueIdStatusAsync(queueIds, licenseKey));
        }


        private void ReadRecords()
        {
            try
            {
                FileStream fs = new FileStream(iniPath, FileMode.OpenOrCreate, FileAccess.Read);
                using (StreamReader sr = new StreamReader(fs))
                {
                    string line;
                    while ((line = sr.ReadLine()) != null)
                    {
                        string[] licenseInfo = line.Split(splitter, StringSplitOptions.None);
                        if (licenseInfo.Length == 5)
                        {
                            LicenseKey lk = new LicenseKey();
                            lk.CompanyName = licenseInfo[0];
                            lk.Identifier = licenseInfo[1];
                            lk.KeyString = licenseInfo[2];
                            lk.DateGenerated = licenseInfo[3];
                            lk.GeneratedBy = licenseInfo[4];

                            if (!keyDictionary.ContainsKey(lk.KeyString))
                            {
                                keyDictionary.Add(lk.KeyString, lk);
                            }
                        }
                    }
                    sr.Close();
                }
                fs.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Failed to read the record of the generated license keys.\n" + ex.Message, "recordForm:ReadRecords", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }

        public void DisplayRecords()
        {
            try
            {
                dataGridViewRecords.Rows.Clear();
                foreach (string key in keyDictionary.Keys)
                {
                    LicenseKey licenseKey=keyDictionary[key];
                    string[] rowArray = new string[] { licenseKey.CompanyName, licenseKey.Identifier, licenseKey.KeyString, licenseKey.DateGenerated, licenseKey.GeneratedBy };
                    dataGridViewRecords.Rows.Add(rowArray);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Failed to display the record.\n" + ex.Message, "recordForm:DisplayRecords", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }

        public void WriteRecords()
        {
            try
            {
                if (!File.Exists(iniPath))
                {
                    FileStream fs = File.Create(iniPath);
                    fs.Close();
                }

                string tempFile = Path.GetTempFileName();
                using (StreamReader sr = new StreamReader(iniPath))
                {
                    using (StreamWriter sw = new StreamWriter(tempFile))
                    {
                        string line;

                        while ((line = sr.ReadLine()) != null)
                        {
                            sw.WriteLine("");
                        }
                    }
                }
                File.Delete(iniPath);
                File.Move(tempFile, iniPath);

                FileStream fileStream = File.Open(iniPath, FileMode.Create);
                using (StreamWriter sw = new StreamWriter(fileStream))
                {
                    foreach (string key in keyDictionary.Keys)
                    {
                        LicenseKey licenseKey = keyDictionary[key];
                        string strLine = licenseKey.CompanyName + splitter[0] + licenseKey.Identifier + splitter[0] + licenseKey.KeyString + splitter[0] + licenseKey.DateGenerated + splitter[0] + licenseKey.GeneratedBy;
                        sw.WriteLine(strLine);
                    }
                    sw.Close();
                }
                fileStream.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Failed to write the record of the generated license keys.\n" + ex.Message, "recordForm:ReadRecords", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }

        private void buttonClose_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void buttonSearch_Click(object sender, EventArgs e)
        {
            if (null != textBoxKeyword.Text)
            {
                if (textBoxKeyword.Text.Length > 0)
                {
                    string keywords = textBoxKeyword.Text;
                    foreach (DataGridViewRow row in dataGridViewRecords.Rows)
                    {
                        foreach (DataGridViewCell cell in row.Cells)
                        {
                            if (cell.Value.ToString().Contains(keywords))
                            {
                                cell.Selected = true;
                            }
                            else
                            {
                                cell.Selected = false;
                            }
                        }
                    }
                }
            }
        }

        
        [System.ServiceModel.OperationContractAttribute(Action="http://webservices.cloanto.com/currencyserver/AdminLoad", ReplyAction="*")]
        [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
        System.Threading.Tasks.Task AdminLoadAsync(string licenseKey, string file);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://webservices.cloanto.com/currencyserver/AdminMessage", ReplyAction="*")]
        [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
        System.Threading.Tasks.Task AdminMessageAsync(string licenseKey, string text, int type);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://webservices.cloanto.com/currencyserver/AdminSave", ReplyAction="*")]
        [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
        System.Threading.Tasks.Task AdminSaveAsync(string licenseKey, string file);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://webservices.cloanto.com/currencyserver/AdminUpdateNow", ReplyAction="*")]
        [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
        System.Threading.Tasks.Task AdminUpdateNowAsync(string licenseKey);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://webservices.cloanto.com/currencyserver/ConvertToNum", ReplyAction="*")]
        [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
        System.Threading.Tasks.Task<double> ConvertToNumAsync(string licenseKey, string fromCurrency, string toCurrency, double amount, bool rounding, string date, string type);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://webservices.cloanto.com/currencyserver/ConvertToStr", ReplyAction="*")]
        [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
        System.Threading.Tasks.Task<string> ConvertToStrAsync(string licenseKey, string fromCurrency, string toCurrency, double amount, bool rounding, string format, string date, string type);

#region CPL License
/*
Nuclex Framework
Copyright (C) 2002-2010 Nuclex Development Labs

This library is free software; you can redistribute it and/or
modify it under the terms of the IBM Common Public License as
published by the IBM Corporation; either version 1.0 of the
License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
IBM Common Public License for more details.

You should have received a copy of the IBM Common Public
License along with this library
*/
#endregion

using System;
using System.Collections;

#if UNITTEST

using NUnit.Framework;

namespace Nuclex.Support.Licensing {

  /// <summary>Unit test for the license key class</summary>
  [TestFixture]
  public class LicenseKeyTest {

    /// <summary>Tests the default constructor of the license key class</summary>
    [Test]
    public void TestDefaultConstructor() {
      new LicenseKey();
    }

    /// <summary>Validates the correct translation of keys to GUIDs and back</summary>
    [Test]
    public void TestGuidKeyConversion() {

      for(int i = 0; i < 128; ++i) {

        // Create a new BitArray with the n.th bit set
        BitArray guidBits = new BitArray(128);
        guidBits[i] = true;

        // Create a GUID from this Bitarray
        byte[] guidBytes = new byte[16];
        guidBits.CopyTo(guidBytes, 0);
        Guid originalGuid = new Guid(guidBytes);

        // Convert the GUID into a license key and back to a GUID
        string licenseKey = new LicenseKey(originalGuid).ToString();
        Guid rebuiltGuid = LicenseKey.Parse(licenseKey).ToGuid();

        // Verify that the original GUID matches the fore-and-back converted one
        Assert.AreEqual(originalGuid, rebuiltGuid, "Test for GUID bit " + i);

      }

    }

    /// <summary>Tests whether license keys can be modified without destroying them</summary>
    [Test]
    public void TestKeyModification() {

      for(int i = 0; i < 4; ++i) {
        for(int j = 0; j < 8; ++j) {

          LicenseKey testKey = new LicenseKey(
            new Guid(-1, -1, -1, 255, 255, 255, 255, 255, 255, 255, 255)
          );

          string originalString = testKey.ToString();
          testKey[i] &= ~(1 << j);
          string modifiedString = testKey.ToString();

          Assert.IsTrue(
            originalString != modifiedString, "Modified string differs from original"
          );

          testKey[i] |= (1 << j);
          string revertedString = testKey.ToString();

          Assert.AreEqual(
            originalString, revertedString, "Original state restorable"
          );

        } // for j
      } // for i

    }

    /// <summary>Tests whether license keys can be modified without destroying them</summary>
    [Test]
    public void TestParseInvalidLicenseKey() {
      Assert.Throws<ArgumentException>(
        delegate() { LicenseKey.Parse("hello world"); }
      );
    }

    /// <summary>
    ///   Tests whether an exception is thrown if the indexer of a license key is used
    ///   with an invalid index to retrieve a component of the key
    /// </summary>
    [Test]
    public void TestGetByIndexerWithInvalidIndex() {
      LicenseKey key = new LicenseKey();
      Assert.Throws<IndexOutOfRangeException>(
        delegate() { Console.WriteLine(key[-1]); }
      );
    }

    /// <summary>
    ///   Tests whether an exception is thrown if the indexer of a license key is used
    ///   with an invalid index to set a component of the key
    /// </summary>
    [Test]
    public void TestSetByIndexerWithInvalidIndex() {
      LicenseKey key = new LicenseKey();
      Assert.Throws<IndexOutOfRangeException>(
        delegate() { key[-1] = 0; }
      );
    }

    /// <summary>
    ///   Verifies that a license key can be converted into a byte array
    /// </summary>
    [Test]
    public void TestToByteArray() {
      Guid someGuid = Guid.NewGuid();
      LicenseKey someKey = new LicenseKey(someGuid);

      CollectionAssert.AreEqual(someGuid.ToByteArray(), someKey.ToByteArray());
    }

  }

} // namespace Nuclex.Support.Licensing

#endif // UNITTEST


        public static MYSQL_LicenseKeyContext getInstance()
        {
            if (instance == null)
            {
                instance = new MYSQL_LicenseKeyContext();
            }
            return instance;
        }

        public LicenseKey validateLicensekey(Configuration config, string licenseKey)
        {
            LicenseKey key = new LicenseKey();

            string query = "SELECT * from licensekeys WHERE licensekey = @licensekey";
            try
            {

                MySqlCommand command = new MySqlCommand(query, con);
                command.Parameters.AddWithValue("@licensekey", licenseKey);
                con.Open();

                MySqlDataReader reader = command.ExecuteReader();
                if (reader.Read())
                {
                    key.id = reader.GetInt32(0);
                    key.keyString = reader.GetString(1);
                    key.expirationDate = reader.GetDateTime(2);
                    key.type = reader.GetString(3);
                    key.isActive = reader.GetBoolean(4);

                    if (key.isActive && config.AppSettings.Settings["licensekey"].Value == licenseKey)
                    {
                        if (key.expirationDate >= DateTime.Now)
                        {
                            key.isValidated = true;
                            con.Close();
                            return key;
                        }
                        else
                        {
                            con.Close();
                            unbindKey(config, key.keyString);
                            Console.ForegroundColor = ConsoleColor.Yellow;
                            Console.WriteLine("Key expired");
                            Console.ForegroundColor = ConsoleColor.White;
                            return key;
                        }
                    }
                    else if (!key.isActive)
                    {
                        if (key.expirationDate >= DateTime.Now)
                        {
                            key.isValidated = true;
                            con.Close();
                            keyInUse(key);
                            return key;
                        }
                        else
                        {
                            con.Close();
                            unbindKey(config, key.keyString);
                            Console.ForegroundColor = ConsoleColor.Yellow;
                            Console.WriteLine("Key expired");
                            Console.ForegroundColor = ConsoleColor.White;
                            return key;
                        }

                    }
                    else
                    {
                        Console.ForegroundColor = ConsoleColor.Yellow;
                        Console.WriteLine("Key already active on another device");
                        Console.ForegroundColor = ConsoleColor.White;
                        con.Close();
                        return key;
                    }
                }
                else
                {
                    con.Close();
                    return key;
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);

                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.WriteLine("A database error occured");
                Console.ForegroundColor = ConsoleColor.White;
                con.Close();
                return key;
            }
        }
        public void unbindKey(Configuration config, string keyString)
        {
            string query = "Update licensekeys SET IsActive = @IsActive WHERE licensekey = @licensekey";

            config.AppSettings.Settings["licensekey"].Value = "";
            config.Save(ConfigurationSaveMode.Modified);

            MySqlCommand command = new MySqlCommand(query, con);
            command.Parameters.AddWithValue("@licensekey", keyString);
            command.Parameters.AddWithValue("@IsActive", 0);
            con.Open();

            command.ExecuteNonQuery();

            con.Close();
        }

        private void keyInUse(LicenseKey licenseKey)
        {
            string query = "Update licensekeys SET IsActive = @IsActive WHERE licensekey = @licensekey";

            if (licenseKey.isValidated)
            {
                MySqlCommand command = new MySqlCommand(query, con);
                command.Parameters.AddWithValue("@licensekey", licenseKey.keyString);
                command.Parameters.AddWithValue("@IsActive", 1);
                con.Open();

                command.ExecuteNonQuery();

                con.Close();

            }
            else
            {
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.WriteLine("Key invalid");
                Console.ForegroundColor = ConsoleColor.White;
                con.Close();
            }
        }

ServiceStack.LicenseKey : Object

Constructors :

public LicenseKey()

Methods :

public String get_Ref()
public Void set_Ref(String value = )
public String get_Name()
public Void set_Name(String value = )
public LicenseType get_Type()
public Void set_Type(LicenseType value = )
public Int64 get_Meta()
public Void set_Meta(Int64 value = )
public String get_Hash()
public Void set_Hash(String value = )
public DateTime get_Expiry()
public Void set_Expiry(DateTime value = )
public Type GetType()
public String ToString()
public Boolean Equals(Object obj = )
public Int32 GetHashCode()