Class LicenseCache
Cache containing list of all module owners, module licenses, system licenses and satellite licenses.
Associate licenses are not covered by this cache as this might cause the cache to be too slow.
Inherited Members
Namespace: SuperOffice.License
Assembly: SoDataBase.dll
Syntax
[CacheV2(0)]
public sealed class LicenseCache : CacheBaseV2
Constructors
LicenseCache()
Cache containing list of all module owners, module licenses, system licenses and satellite licenses.
Associate licenses are not covered by this cache as this might cause the cache to be too slow.
Declaration
public LicenseCache()
Properties
TableNames
Gets the names of the table data that are cached in this cache. When these tables are updated the cache will be disposed so a new cache instance can take its place.
Declaration
protected override IEnumerable<string> TableNames { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<string> |
Overrides
Methods
GetLoginRightModule(UserType)
Get the module thay holds the login right for a particular user type.
Declaration
public ModuleLicenseRecordData GetLoginRightModule(UserType userType)
Parameters
| Type | Name | Description |
|---|---|---|
| UserType | userType | User type to get module that is required for logging on. |
Returns
| Type | Description |
|---|---|
| ModuleLicenseRecordData | Instance of ModuleLicenseRecordData if the appropriate login-right is found, otherwise null. |
GetLoginRightModuleId(UserType)
Get the primary key of the module license holding login right for a partular user type.
Declaration
public int GetLoginRightModuleId(UserType userType)
Parameters
| Type | Name | Description |
|---|---|---|
| UserType | userType | User type. |
Returns
| Type | Description |
|---|---|
| int | Primary key of the module licese holding login right for a particular user type. |
GetModule(int)
Get Module License from a module license id.
Declaration
public ModuleLicenseRecordData GetModule(int moduleId)
Parameters
| Type | Name | Description |
|---|---|---|
| int | moduleId | Primary key of the module license to get. |
Returns
| Type | Description |
|---|---|
| ModuleLicenseRecordData | Module license from module id. Null is returned if the module license is not held by the cache. |
GetModule(string)
Get a module from the modules full name, formatted like [ModuleOwner].[ModuleName].
Declaration
public ModuleLicenseRecordData GetModule(string fullName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | fullName | Modules full name, formatted like [ModuleOwner].[ModuleName] |
Returns
| Type | Description |
|---|---|
| ModuleLicenseRecordData | Module license from module owner name and the module name. |
GetModule(string, string)
Get module row provided the module owner name and the module name.
Declaration
public ModuleLicenseRecordData GetModule(string ownerName, string moduleName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | ownerName | Name of the module owner. |
| string | moduleName | Name of the module license |
Returns
| Type | Description |
|---|---|
| ModuleLicenseRecordData | Module license from module owner name and the module name. |
GetModules(string)
Return all the module licenses belonging to one owner
Declaration
public IEnumerable<ModuleLicenseRecordData> GetModules(string ownerName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | ownerName |
Returns
| Type | Description |
|---|---|
| IEnumerable<ModuleLicenseRecordData> |
GetOwner(int)
Get Module owner from id
Declaration
public ModuleOwnerRecordData GetOwner(int moduleOwnerId)
Parameters
| Type | Name | Description |
|---|---|---|
| int | moduleOwnerId | Id of module owner |
Returns
| Type | Description |
|---|---|
| ModuleOwnerRecordData | Module owner from Id. Null is returned if the owner is not held by the cache. |
GetOwner(string)
Get module owner from the owner name
Declaration
public ModuleOwnerRecordData GetOwner(string moduleOwner)
Parameters
| Type | Name | Description |
|---|---|---|
| string | moduleOwner | Name of the module owner |
Returns
| Type | Description |
|---|---|
| ModuleOwnerRecordData | Module owner from name. Null is returned if the owner is not held by the cache. |
GetOwners()
Return all module owners
Declaration
public IEnumerable<ModuleOwnerRecordData> GetOwners()
Returns
| Type | Description |
|---|---|
| IEnumerable<ModuleOwnerRecordData> |
GetSiteLicenses()
Get all site module license record data in the database.
Declaration
public IEnumerable<ModuleLicenseRecordData> GetSiteLicenses()
Returns
| Type | Description |
|---|---|
| IEnumerable<ModuleLicenseRecordData> | All site license record data. |
OnLoad()
Cache containing list of all module owners, module licenses, system licenses and satellite licenses.
Associate licenses are not covered by this cache as this might cause the cache to be too slow.
Declaration
protected override void OnLoad()
Overrides
OnLoadAsync(CancellationToken)
Cache containing list of all module owners, module licenses, system licenses and satellite licenses.
Associate licenses are not covered by this cache as this might cause the cache to be too slow.
Declaration
[CreateSyncVersion(OmitNullableDirective = true)]
protected override Task OnLoadAsync(CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task |