C# License Manager API¶
OneML class that manages licensing of all OneML APIs.
-
OneML.Face.LicenseManager : public global.SystemIDisposable Public Functions
-
inline void
Dispose() Gracefully destroy the object and free memory.
-
inline
LicenseManager()¶ Construct a LicenseManager object.
-
inline void
SetKey(string key)¶ Set the oneML product key.
- Parameters
key: a string of product key.
-
inline string
GetKey()¶ Get the product key.
- Return
string of product key.
-
inline LicenseStatus
ActivateKey()¶ Activate product key, requires to set a key first.
- Return
LicenseStatus::Ok if activate success, LicenseStatus::Error otherwise.
-
inline string
GetMachineCode()¶ Get a machine code used as a machine unique identifier.
- Return
string of a machine code.
-
inline bool
IsTrial()¶ Check if product key is trial or not, requires to actvate a key first.
- Return
true if product key is trial key, false otherwise.
-
inline LicenseStatus
ValidateActivation()¶ Check if product key is valid or not (not expired), requires to activate a key first.
- Return
LicenseStatus.
-
inline LicenseActivationType
GetActivationType()¶ Get the type of the current activation.
- Return
LicenseActivationType: an enum of activation type
NotFound: If a license is not activated or not found
KeyOnline: If an activation is done by a license key and an online service
TrialOnline: If a trial activation is done by an online service
-
inline ulong
GetActivationExpiryDate()¶ Get the key expiry date.
- Return
uint64_t unix time.
-
inline ulong
GetActivationSuspendedDate()¶ Get the key suspension date.
- Return
uint64_t unix time.
-
inline void
Enums
Enums
-
OneML.Alpr.LicenseManager : public global.SystemIDisposable Public Functions
-
inline void
Dispose() Gracefully destroy the object and free memory.
-
inline
LicenseManager() Construct a LicenseManager object.
-
inline void
SetKey(string key) Set the oneML product key.
- Parameters
key: a string of product key.
-
inline string
GetKey() Get the product key.
- Return
string of product key.
-
inline LicenseStatus
ActivateKey() Activate product key, requires to set a key first.
- Return
LicenseStatus::Ok if activate success, LicenseStatus::Error otherwise.
-
inline string
GetMachineCode() Get a machine code used as a machine unique identifier.
- Return
string of a machine code.
-
inline bool
IsTrial() Check if product key is trial or not, requires to actvate a key first.
- Return
true if product key is trial key, false otherwise.
-
inline LicenseStatus
ValidateActivation() Check if product key is valid or not (not expired), requires to activate a key first.
- Return
LicenseStatus.
-
inline LicenseActivationType
GetActivationType() Get the type of the current activation.
- Return
LicenseActivationType: an enum of activation type
NotFound: If a license is not activated or not found
KeyOnline: If an activation is done by a license key and an online service
TrialOnline: If a trial activation is done by an online service
-
inline ulong
GetActivationExpiryDate() Get the key expiry date.
- Return
uint64_t unix time.
-
inline ulong
GetActivationSuspendedDate() Get the key suspension date.
- Return
uint64_t unix time.
-
inline void
Enums
-
enum
LicenseStatus Values:
-
enumerator
Ok
-
enumerator
Error
-
enumerator
Expired
-
enumerator
Suspended
-
enumerator
Enums
-
enum
LicenseActivationType Values:
-
enumerator
NotFound
-
enumerator
KeyOnline
-
enumerator
TrialOnline
-
enumerator