LicenseManager Class
Abblix.Oidc.Server
Abblix.Oidc.Server.Features.Licensing
LicenseManager Class
Manages the application's licenses, ensuring that the current license is appropriately evaluated based on its validity period.
public class LicenseManager
Inheritance System.Object → LicenseManager
Remarks
This class supports the addition of multiple licenses and determines the active license by considering their validity periods. It uses a thread-safe approach to manage concurrent access to the licenses list, allowing for efficient reads and safe updates.
Methods
LicenseManager.AddLicense(License) Method
Adds a new license to the application, placing it in the correct position based on its validity period.
public void AddLicense(Abblix.Oidc.Server.Features.Licensing.License license);
Parameters
license License
The license to be added.
Remarks
The method inserts the license into a sorted list, ensuring that licenses are ordered based on their validity periods. This ordering facilitates the determination of the current active license.
LicenseManager.GetLicenses() Method
Provides access to the currently managed licenses.
public System.Collections.Generic.IEnumerable<Abblix.Oidc.Server.Features.Licensing.License> GetLicenses();
Returns
System.Collections.Generic.IEnumerable<License>
A sequence of all licenses managed by the LicenseManager.
LicenseManager.TryGetCurrentLicenseLimit(DateTimeOffset) Method
Attempts to retrieve the current license from the LicenseManager based on the given moment in time.
public Abblix.Oidc.Server.Features.Licensing.License? TryGetCurrentLicenseLimit(System.DateTimeOffset utcNow);
Parameters
utcNow System.DateTimeOffset
The current UTC time to determine the active license.
Returns
License
The current license if one is active and valid, otherwise null.