Class Licensing
Provides methods for loading, retrieving, and validating licenses.
public static class Licensing
- Inheritance
-
objectLicensing
Properties
ProductName
Gets or sets the product Name (relates to Scope in license).
public static string? ProductName { get; set; }
Property Value
Methods
GetLicense()
Retrieves the loaded license.
public static License GetLicense()
Returns
- License
The loaded license.
Exceptions
- Exception
Thrown if the license is not loaded.
LoadLicenseFromFile(string, string?)
Loads a license from a file.
public static void LoadLicenseFromFile(string licensePath, string? tenantId = null)
Parameters
licensePathstringThe path to the license file.
tenantIdstringThe tenant ID for which to load the license. If null, sets the default license.
Exceptions
- FileNotFoundException
Thrown if the license file is not found.
- FileLoadException
Thrown if the license file is empty.
LoadLicenseFromString(string, string?)
Loads a license from a string.
public static void LoadLicenseFromString(string licenseStr, string? tenantId = null)
Parameters
licenseStrstringThe license string.
tenantIdstringThe tenant ID for which to load the license. If null, sets the default license.
ValidateLicense()
Validates the loaded license.
public static void ValidateLicense()
Exceptions
- Exception
Thrown if the license is not loaded or is invalid.