Class LicenseManager
- Namespace
- Z.EntityFramework.Extensions
- Assembly
- Z.EntityFramework.Extensions.dll
Manager for licenses.
public class LicenseManager
- Inheritance
-
LicenseManager
- Inherited Members
Constructors
LicenseManager()
public LicenseManager()
Methods
AddLicense(string, string)
Adds a license key (Multiple license key can be added).
public static void AddLicense(string licenseName, string licenseKey)
Parameters
IsLicenseAdded()
Check if at least one license as been added (Doesn't mean the license is valid).
public static bool IsLicenseAdded()
Returns
- bool
True if at least one license as been added (Doesn't mean the license is valid).
IsTrialExpired()
Check if the trial period is expired or not (Doesn't mean the trial period is enabled).
public static bool IsTrialExpired()
Returns
- bool
True if the trial period is expired or not (Doesn't mean the trial period is enabled).
IsTrialMode()
Check if the trial mode is enabled.
public static bool IsTrialMode()
Returns
- bool
True if the trial mode is enabled.
ValidateLicense(out string, ProviderType)
public static bool ValidateLicense(out string errorMessage, ProviderType provider = ProviderType.SqlServer)
Parameters
errorMessage
stringprovider
ProviderType
Returns
ValidateLicense(ProviderType)
Validates if license added is valid.
public static bool ValidateLicense(ProviderType provider = ProviderType.SqlServer)
Parameters
provider
ProviderTypeThe provider specific for the license.
Returns
- bool
true if it's valid, false if it's invalid.