public class CLicenseData
{
private List<CUnlockedProduct> m_UnlockedProducts = new List<CUnlockedProduct>();
private List<CUnlockedTrialProduct> m_UnlockedTrialProducts = new List<CUnlockedTrialProduct>();
private string m_strComputerFingerPrint = "";
private bool m_bIsCreatedWithOverridePassword;
private bool m_bIsManuallyGenerated;
private int m_nMajorVersion;
private long m_nLastDateLaunched = DateTime.Now.Ticks;
public List<string> m_strCurrentUnlockedModuleNames = new List<string>();
public long LastDateLaunched
{
get
{
return this.m_nLastDateLaunched;
}
set
{
this.m_nLastDateLaunched = value;
}
}
public int MajorVersion
{
get
{
return this.m_nMajorVersion;
}
set
{
this.m_nMajorVersion = value;
}
}
public List<CUnlockedProduct> UnlockedProducts
{
get
{
return this.m_UnlockedProducts;
}
set
{
this.m_UnlockedProducts = value;
}
}
public List<CUnlockedTrialProduct> UnlockedTrialProducts
{
get
{
return this.m_UnlockedTrialProducts;
}
set
{
this.m_UnlockedTrialProducts = value;
}
}
public string ComputerFingerPrint
{
get
{
return this.m_strComputerFingerPrint;
}
set
{
this.m_strComputerFingerPrint = value;
}
}
public bool IsCreatedWithOverridePassword
{
get
{
return this.m_bIsCreatedWithOverridePassword;
}
set
{
this.m_bIsCreatedWithOverridePassword = value;
}
}
public bool IsManuallyGenerated
{
get
{
return this.m_bIsManuallyGenerated;
}
set
{
this.m_bIsManuallyGenerated = value;
}
}
}
public static object DeserializeBLOb(string strData, Type type)
{
MemoryStream memoryStream = new MemoryStream();
XmlSerializer xmlSerializer = new XmlSerializer(type);
byte[] array = ToByteArray(strData);
memoryStream.Write(array, 0, array.Length);
memoryStream.Position = 0L;
XmlReader xmlReader = new XmlTextReader(memoryStream);
return xmlSerializer.Deserialize(xmlReader);
}
public static byte[] ToByteArray(string strValue)
{
byte[] array = new byte[strValue.Length];
for (int i = 0; i < strValue.Length; i++)
{
array[i] = Convert.ToByte(strValue[i]);
}
return array;
}