Show / Hide Table of Contents

Class LicenseManager

The license manager.

Inheritance
object
LicenseManager
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: ComponentSpace.Saml2.Licensing
Assembly: ComponentSpace.Saml2.dll
Syntax
public class LicenseManager

Constructors

LicenseManager(IOptionsMonitor<LicenseOptions>, IHostEnvironment, ILoggerFactory)

Initializes a new instance of the LicenseManager class.

Declaration
public LicenseManager(IOptionsMonitor<LicenseOptions> licenseOptions, IHostEnvironment hostEnvironment, ILoggerFactory loggerFactory)
Parameters
Type Name Description
IOptionsMonitor<LicenseOptions> licenseOptions

The license options.

IHostEnvironment hostEnvironment

The host environment.

ILoggerFactory loggerFactory

The logger factory.

Properties

CustomerID

Gets the customer ID.

Declaration
public string CustomerID { get; }
Property Value
Type Description
string

The customer ID.

Expiry

Gets the expiry date.

Declaration
public DateTime Expiry { get; }
Property Value
Type Description
DateTime

The expiry date.

IssuedAt

Gets the issued at date.

Declaration
public DateTime IssuedAt { get; }
Property Value
Type Description
DateTime

The issued at date.

LicenseNumber

Gets the license number.

Declaration
public string LicenseNumber { get; }
Property Value
Type Description
string

The license number.

ProductID

Gets the product ID.

Declaration
public string ProductID { get; }
Property Value
Type Description
string

The product ID.

Methods

CheckLicense()

Checks for a valid license.

Declaration
public void CheckLicense()
Exceptions
Type Condition
InvalidLicenseException

Thrown when the license check fails.

HasExpired()

Indicates whether the license has expired.

Declaration
public bool HasExpired()
Returns
Type Description
bool

true if the license has expired; otherwise false.

IsLicenseProvided()

Indicates whether a license is provided.

Declaration
public bool IsLicenseProvided()
Returns
Type Description
bool

true if a license is provided; otherwise false.

IsLicensed()

Indicates whether the product is licensed.

Declaration
public bool IsLicensed()
Returns
Type Description
bool

true if licensed; otherwise false.

LoadLicenseAsync()

Loads the license.

Declaration
public Task LoadLicenseAsync()
Returns
Type Description
Task

A task that represents the operation.

Exceptions
Type Condition
InvalidLicenseException

Thrown when the license fails to load.

In this article
Back to top Copyright © ComponentSpace Pty Ltd 2017-2026. All rights reserved.