Interface ILicenseManager
Utility class for dealing with licenses
Namespace: SuperOffice.License
Assembly: SoDataBase.dll
Syntax
public interface ILicenseManager
Remarks
Accessing this class is a 2 phase process, after getting the instance from the DI container you must also call InitializeAsync().
Methods
ActivateLicenseInfoAsync(ExtendedLicenseInfo, bool, bool, CancellationToken)
Utility class for dealing with licenses
Declaration
Task ActivateLicenseInfoAsync(ExtendedLicenseInfo newLicense, bool checkSerialNumber = true, bool checkUserLicense = true, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
ExtendedLicenseInfo | newLicense | |
bool | checkSerialNumber | |
bool | checkUserLicense | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task |
Remarks
Accessing this class is a 2 phase process, after getting the instance from the DI container you must also call InitializeAsync().
ChangeSerialNumberAsync(string, string, CancellationToken)
Utility class for dealing with licenses
Declaration
Task ChangeSerialNumberAsync(string newCompanyName, string newSerialNumber, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | newCompanyName | |
string | newSerialNumber | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task |
Remarks
Accessing this class is a 2 phase process, after getting the instance from the DI container you must also call InitializeAsync().
GetAssociateLicenseUsageCountAsync(AssociateType, int[], CancellationToken)
Utility class for dealing with licenses
Declaration
Task<Dictionary<int, int>> GetAssociateLicenseUsageCountAsync(AssociateType associateType, int[] associateModules, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
AssociateType | associateType | |
int[] | associateModules | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<Dictionary<int, int>> |
Remarks
Accessing this class is a 2 phase process, after getting the instance from the DI container you must also call InitializeAsync().
GetCurrentLicenseAsync(string, CancellationToken)
Utility class for dealing with licenses
Declaration
Task<(LicenseInfo, DateTime)> GetCurrentLicenseAsync(string moduleOwner, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | moduleOwner | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<(LicenseInfo, DateTime)> |
Remarks
Accessing this class is a 2 phase process, after getting the instance from the DI container you must also call InitializeAsync().
GetGrantedModuleLicenses(int)
Utility class for dealing with licenses
Declaration
GrantedModuleLicense[] GetGrantedModuleLicenses(int associateId)
Parameters
Type | Name | Description |
---|---|---|
int | associateId |
Returns
Type | Description |
---|---|
GrantedModuleLicense[] |
Remarks
Accessing this class is a 2 phase process, after getting the instance from the DI container you must also call InitializeAsync().
GetLicenseForAllOwnersFromDBAsync(CancellationToken)
Utility class for dealing with licenses
Declaration
Task<ExtendedLicenseInfo[]> GetLicenseForAllOwnersFromDBAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<ExtendedLicenseInfo[]> |
Remarks
Accessing this class is a 2 phase process, after getting the instance from the DI container you must also call InitializeAsync().
GetLicenseFromDBAsync(string, CancellationToken)
Utility class for dealing with licenses
Declaration
Task<ExtendedLicenseInfo> GetLicenseFromDBAsync(string ownerName, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | ownerName | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<ExtendedLicenseInfo> |
Remarks
Accessing this class is a 2 phase process, after getting the instance from the DI container you must also call InitializeAsync().
GetLicenseFromFileAsync(string, CancellationToken)
Utility class for dealing with licenses
Declaration
Task<ExtendedLicenseInfo> GetLicenseFromFileAsync(string fileContent, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | fileContent | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<ExtendedLicenseInfo> |
Remarks
Accessing this class is a 2 phase process, after getting the instance from the DI container you must also call InitializeAsync().
GetLicenseFromLicenseServerAsync(string, string, CancellationToken)
Utility class for dealing with licenses
Declaration
Task<ExtendedLicenseInfo> GetLicenseFromLicenseServerAsync(string ownerName, string additionalInfo = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | ownerName | |
string | additionalInfo | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<ExtendedLicenseInfo> |
Remarks
Accessing this class is a 2 phase process, after getting the instance from the DI container you must also call InitializeAsync().
GetLicenseFromLicenseServerWithAssignmentsAsync(string, bool, string, CancellationToken)
Utility class for dealing with licenses
Declaration
Task<ExtendedLicenseInfoWithAssignments> GetLicenseFromLicenseServerWithAssignmentsAsync(string ownerName, bool isTestUpgrade = false, string licenseUrl = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | ownerName | |
bool | isTestUpgrade | |
string | licenseUrl | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<ExtendedLicenseInfoWithAssignments> |
Remarks
Accessing this class is a 2 phase process, after getting the instance from the DI container you must also call InitializeAsync().
GetLicenseStateFromLicenseServerAsync(string, string, CancellationToken)
Utility class for dealing with licenses
Declaration
Task<CheckLicenseStatusResult> GetLicenseStateFromLicenseServerAsync(string ownerName, string additionalInfo = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | ownerName | |
string | additionalInfo | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<CheckLicenseStatusResult> |
Remarks
Accessing this class is a 2 phase process, after getting the instance from the DI container you must also call InitializeAsync().
GetModuleLicenseHistoryFromLicenseServerAsync(ExtendedLicenseInfo, ExtendedModuleLicense, CancellationToken)
Utility class for dealing with licenses
Declaration
Task<string> GetModuleLicenseHistoryFromLicenseServerAsync(ExtendedLicenseInfo licenseInfo, ExtendedModuleLicense moduleLicense, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
ExtendedLicenseInfo | licenseInfo | |
ExtendedModuleLicense | moduleLicense | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<string> |
Remarks
Accessing this class is a 2 phase process, after getting the instance from the DI container you must also call InitializeAsync().
GetModuleOwnerAsync(string, CancellationToken)
Utility class for dealing with licenses
Declaration
Task<ModuleOwnerRow> GetModuleOwnerAsync(string moduleOwner, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | moduleOwner | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<ModuleOwnerRow> |
Remarks
Accessing this class is a 2 phase process, after getting the instance from the DI container you must also call InitializeAsync().
GetModuleOwnersAsync(CancellationToken)
Utility class for dealing with licenses
Declaration
Task<ModuleOwnerRow[]> GetModuleOwnersAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<ModuleOwnerRow[]> |
Remarks
Accessing this class is a 2 phase process, after getting the instance from the DI container you must also call InitializeAsync().
GetSatelliteLicenseUsageCountAsync(int[], CancellationToken)
Utility class for dealing with licenses
Declaration
Task<Dictionary<int, int>> GetSatelliteLicenseUsageCountAsync(int[] satelliteModules, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int[] | satelliteModules | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<Dictionary<int, int>> |
Remarks
Accessing this class is a 2 phase process, after getting the instance from the DI container you must also call InitializeAsync().
GetSatelliteLicensesAsync(int, bool, CancellationToken)
Utility class for dealing with licenses
Declaration
Task<SatelliteModuleLicenseOwner[]> GetSatelliteLicensesAsync(int satelliteId, bool fetchForCentralIfSatelliteIdIsZero, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | satelliteId | |
bool | fetchForCentralIfSatelliteIdIsZero | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<SatelliteModuleLicenseOwner[]> |
Remarks
Accessing this class is a 2 phase process, after getting the instance from the DI container you must also call InitializeAsync().
GetShopUrlAsync(string, string, CancellationToken)
Utility class for dealing with licenses
Declaration
Task<string> GetShopUrlAsync(string ownerName, string context, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | ownerName | |
string | context | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<string> |
Remarks
Accessing this class is a 2 phase process, after getting the instance from the DI container you must also call InitializeAsync().
GetUserLicensesAsync(int, UserType, CancellationToken)
Utility class for dealing with licenses
Declaration
Task<AssociateModuleLicenseOwner[]> GetUserLicensesAsync(int associateId, UserType allowedType, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | associateId | |
UserType | allowedType | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<AssociateModuleLicenseOwner[]> |
Remarks
Accessing this class is a 2 phase process, after getting the instance from the DI container you must also call InitializeAsync().
InitializeAsync()
Should be called before using the license manager.
Declaration
Task InitializeAsync()
Returns
Type | Description |
---|---|
Task |
Remarks
Accessing this class is a 2 phase process, after getting the instance from the DI container you must also call InitializeAsync().
LicenseExists(string)
Utility class for dealing with licenses
Declaration
bool LicenseExists(string license)
Parameters
Type | Name | Description |
---|---|---|
string | license |
Returns
Type | Description |
---|---|
bool |
Remarks
Accessing this class is a 2 phase process, after getting the instance from the DI container you must also call InitializeAsync().
LoadNewLicenseFromServerIfNeededAsync(CancellationToken)
Utility class for dealing with licenses
Declaration
Task LoadNewLicenseFromServerIfNeededAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task |
Remarks
Accessing this class is a 2 phase process, after getting the instance from the DI container you must also call InitializeAsync().
MapAndValidateLicenseWithDbAsync(LicenseInfo, CancellationToken)
Utility class for dealing with licenses
Declaration
Task<ExtendedLicenseInfo> MapAndValidateLicenseWithDbAsync(LicenseInfo newLicense, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
LicenseInfo | newLicense | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<ExtendedLicenseInfo> |
Remarks
Accessing this class is a 2 phase process, after getting the instance from the DI container you must also call InitializeAsync().
RemoveLicenseFromDBAsync(string, CancellationToken)
Utility class for dealing with licenses
Declaration
Task RemoveLicenseFromDBAsync(string ownerName, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | ownerName | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task |
Remarks
Accessing this class is a 2 phase process, after getting the instance from the DI container you must also call InitializeAsync().
UpgradeToNewPricelistAsync(string, string, string, ProgressEstimateCallback, ProgressStepCallback, CancellationToken)
Utility class for dealing with licenses
Declaration
Task<bool> UpgradeToNewPricelistAsync(string systemUser, string password, string additionalInfo, ProgressEstimateCallback estimateCB, ProgressStepCallback stepCB, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | systemUser | |
string | password | |
string | additionalInfo | |
ProgressEstimateCallback | estimateCB | |
ProgressStepCallback | stepCB | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<bool> |
Remarks
Accessing this class is a 2 phase process, after getting the instance from the DI container you must also call InitializeAsync().
ValidateLicenseInfo(ExtendedLicenseInfo)
Utility class for dealing with licenses
Declaration
void ValidateLicenseInfo(ExtendedLicenseInfo licenseInfo)
Parameters
Type | Name | Description |
---|---|---|
ExtendedLicenseInfo | licenseInfo |
Remarks
Accessing this class is a 2 phase process, after getting the instance from the DI container you must also call InitializeAsync().
ValidateLicenseInfo(LicenseInfo, bool)
Utility class for dealing with licenses
Declaration
void ValidateLicenseInfo(LicenseInfo licenseInfo, bool checkSerialNumber = true)
Parameters
Type | Name | Description |
---|---|---|
LicenseInfo | licenseInfo | |
bool | checkSerialNumber |
Remarks
Accessing this class is a 2 phase process, after getting the instance from the DI container you must also call InitializeAsync().