Table of Contents

Class Licensing

Namespace
BpNexT.NET
Assembly
BpNexT.NET.dll

Provides methods for loading, retrieving, and validating licenses.

public static class Licensing
Inheritance
object
Licensing

Properties

ProductName

Gets or sets the product Name (relates to Scope in license).

public static string? ProductName { get; set; }

Property Value

string

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

licensePath string

The path to the license file.

tenantId string

The 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

licenseStr string

The license string.

tenantId string

The 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.