![]() | Habanero.Licensing.Validation Namespace |
Class | Description | |
---|---|---|
![]() | LicenseHelper | Obsolete. |
![]() | LicenseValidationResult |
Indicates the result of a license check.
|
![]() | LicenseValidator |
Used for validating licenses prevously stored or entered by a user. Also supports
directly activating a trial.
|
Enumeration | Description | |
---|---|---|
![]() | LicenseIssue |
LicenseIssue represents reasons why a license is invalid.
|
![]() | LicenseLocation |
Represent the storage location for the license.
|
![]() | LicenseState |
Represents the state of the license.
|
string[] StandardOrHigher = new string[3] { "Standard", "Pro", "Enterprise" }; string[] ProOrHigher = new string[2] { "Pro", "Enterprise" }; string[] EnterpriseOrHigher = new string[1] { "Enterprise" }; LicenseValidator validator = new LicenseValidator(LicenseLocation.File, LicenseFileLocation, productName, publicKey, applicationSecret, ThisVersion); LicenseValidationResult result = validator.CheckLicense(); switch (result.State) { case LicenseState.Valid: //users license is valid break; case LicenseState.Trial: //users license is trial break; default: //users license is invalid break; } //check what edition we are running if (validator.IsEdition(EnterpriseOrHigher)) { //enable enteprise features } if (validator.IsEdition(ProOrHigher)) { //enable pro features } if (validator.IsEdition(StandardOrHigher)) { //enable standard features }