Class Api
Use methods of this class to set and check the license key state, and to get current machine's hardware id.
Inherited Members
Namespace: ArmDot.Client
Assembly: ArmDot.Client.dll
Syntax
public static class Api
Methods
GetCurrentMachineHardwareId(byte)
Generates a hardware id based on the current machine's hardware.
Declaration
public static string GetCurrentMachineHardwareId(byte hardware)
Parameters
Type | Name | Description |
---|---|---|
byte | hardware | Use it to specify the hardware combination you want to use to generate a hardware id. One or several of the ArmDot.Client.Api.Hardware values are possible. |
Returns
Type | Description |
---|---|
string | The current machine's hardware id. |
GetExpirationDate()
A license key becomes expired and ArmDot.Client.Api.GetLicenseState returns LicenseKeyState.Expired
if a current date is more than an expiraton date.
ArmDot.Client.Api.PutKey must have been already called.
Declaration
public static DateTime? GetExpirationDate()
Returns
Type | Description |
---|---|
DateTime? | An expiration date stored in a current license key. |
GetLicenseState()
Returns state of a license.
Declaration
public static int GetLicenseState()
Returns
Type | Description |
---|---|
int | For possible return values, refer to ArmDot.Client.Api.LicenseKeyState. |
GetMaximumBuildDate()
Retrieves a maximum build date from a current license key.
Returned DateTime?
has a value if a current license key contains maximum build date.
A license key becomes expired and ArmDot.Client.Api.GetLicenseState returns LicenseKeyState.MaximumBuildDateExpired
for binaries, built after maximum build date.
ArmDot.Client.Api.PutKey must have been already called.
Declaration
public static DateTime? GetMaximumBuildDate()
Returns
Type | Description |
---|---|
DateTime? | A maximum build date stored in a current license key. |
GetUserData()
Retrieves a user data from the current license key. ArmDot.Client.Api.PutKey must have been already called.
Declaration
public static byte[] GetUserData()
Returns
Type | Description |
---|---|
byte[] | A user data stored in a current license key. |
GetUserEMail()
Retrieves a user e-mail from the current license key. ArmDot.Client.Api.PutKey must have been already called.
Declaration
public static string GetUserEMail()
Returns
Type | Description |
---|---|
string | A user e-mail stored in a current license key. |
GetUserName()
Retrieves a user name from a current license key. ArmDot.Client.Api.PutKey must have been already called.
Declaration
public static string GetUserName()
Returns
Type | Description |
---|---|
string | A user name stored in a current license key. |
IsCodeProtected()
Use IsCodeProtected
to check whether the code of a method was processed by ArmDot, or not.
Declaration
public static bool IsCodeProtected()
Returns
Type | Description |
---|---|
bool | If If |
PutKey(string)
Puts a license key.
Declaration
public static void PutKey(string key)
Parameters
Type | Name | Description |
---|---|---|
string | key |