Class LicenseManager
- Namespace
- Z.BulkOperations
- 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 to activate different product or provider).
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(out string, ProviderType, bool, bool, bool)
Validates the license.
public static bool ValidateLicense(out string errorMessage, ProviderType provider, bool isEntityFramework, bool isDapper, bool isLinqToSql)
Parameters
errorMessage
stringprovider
ProviderTypeThe provider.
isEntityFramework
booltrue if this object is entity framework.
isDapper
booltrue if this object is dapper.
isLinqToSql
bool
Returns
- bool
true if it succeeds, false if it fails.
ValidateLicense(ProviderType)
Validates the license.
public static bool ValidateLicense(ProviderType provider = ProviderType.SqlServer)
Parameters
provider
ProviderTypeThe provider.
Returns
- bool
true if it succeeds, false if it fails.