Table of Contents

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

licenseName string

Name of the license.

licenseKey string

The license key.

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 string
provider ProviderType

Returns

bool

ValidateLicense(ProviderType)

Validates if license added is valid.

public static bool ValidateLicense(ProviderType provider = ProviderType.SqlServer)

Parameters

provider ProviderType

The provider specific for the license.

Returns

bool

true if it's valid, false if it's invalid.