Show / Hide Table of Contents

Class LicenseAgent

Proxy class for the License Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.

Inheritance
object
LicenseAgent
Implements
ILicenseAgent
IAgent
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.Implementation.dll
Syntax
public class LicenseAgent : ILicenseAgent, IAgent

Constructors

LicenseAgent(ILicenseImplementation, ISoRequestItemsAccessor)

Proxy class for the License Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.

Declaration
public LicenseAgent(ILicenseImplementation licenseImplementation, ISoRequestItemsAccessor accessor)
Parameters
Type Name Description
ILicenseImplementation licenseImplementation
ISoRequestItemsAccessor accessor

LicenseAgent(ILicenseImplementation, ISoRequestItemsAccessor, IDebugUser, IServiceCallsRepository)

Proxy class for the License Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.

Declaration
public LicenseAgent(ILicenseImplementation licenseImplementation, ISoRequestItemsAccessor accessor, IDebugUser debugUser, IServiceCallsRepository serviceCallsRepository)
Parameters
Type Name Description
ILicenseImplementation licenseImplementation
ISoRequestItemsAccessor accessor
IDebugUser debugUser
IServiceCallsRepository serviceCallsRepository

Methods

ActivateLicenseInfoAsync(ExtendedLicenseInfo, CancellationToken)

Save a new license to the database.

Declaration
public Task<LicenseResult> ActivateLicenseInfoAsync(ExtendedLicenseInfo newLicense, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ExtendedLicenseInfo newLicense

New license to save to the database.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<LicenseResult>

AddLicenseFromFileAsync(string, CancellationToken)

Load and activate a new license from file/string if the new license is valid.

Declaration
public Task<ExtendedLicenseInfo> AddLicenseFromFileAsync(string fileContent, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string fileContent

Content of the license file as XML.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<ExtendedLicenseInfo>

Activated license

AssignThirdPartyLicensesAsync(int, string, string[], CancellationToken)

Assign third party licenses

Declaration
public Task<ModuleLicenseLink[]> AssignThirdPartyLicensesAsync(int associateId, string moduleOwner, string[] moduleLicenseNames, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int associateId

User to assign third party licenses for

string moduleOwner

Name of the module owner to assign license for

string[] moduleLicenseNames

Name of module licenses to assign

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<ModuleLicenseLink[]>

All module license names assigned

ChangeSerialNumberAsync(string, string, CancellationToken)

Change the new serial number for the installation. Requests a new license from SuperLicense, checks if change is authorized.

Declaration
public Task<LicenseResult> ChangeSerialNumberAsync(string newCompanyName, string newSerialNumber, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string newCompanyName

The new company name

string newSerialNumber

New serial number to change to.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<LicenseResult>

License after serial number/name change

GetCentralLicenseAsync(CancellationToken)

Proxy class for the License Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.

Declaration
public Task<LicenseOwner[]> GetCentralLicenseAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<LicenseOwner[]>

GetLicenseForAllOwnersFromDBAsync(CancellationToken)

Get all licenses, with usage, from all module owners as they are stored in the database

Declaration
public Task<ExtendedLicenseInfo[]> GetLicenseForAllOwnersFromDBAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<ExtendedLicenseInfo[]>

GetLicenseFromDBAsync(string, CancellationToken)

Get license, with usage, as it is stored in the database for one particular module owner.

Declaration
public Task<ExtendedLicenseInfo> GetLicenseFromDBAsync(string ownerName, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string ownerName

Name of the module owner.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<ExtendedLicenseInfo>

License, with usage, as it is stored in the database.

GetLicenseFromFileAsync(string, CancellationToken)

Load a new license from file

Declaration
public Task<ExtendedLicenseInfo> GetLicenseFromFileAsync(string fileContent, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string fileContent

Content of the license file as read.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<ExtendedLicenseInfo>

GetLicenseFromLicenseServerAsync(string, CancellationToken)

Proxy class for the License Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.

Declaration
public Task<ExtendedLicenseInfo> GetLicenseFromLicenseServerAsync(string ownerName, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string ownerName
CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<ExtendedLicenseInfo>

GetLicenseStatusFromLicenseServerAsync(string, CancellationToken)

Get License from the license server for a particular module owner.

Declaration
public Task<CheckLicenseStatusResult> GetLicenseStatusFromLicenseServerAsync(string ownerName, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string ownerName

Name of the module owner to get license from.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<CheckLicenseStatusResult>

License from the database, from the license server and with usage.

GetModuleLicenseFromDBAsync(string, string, CancellationToken)

Get license information for one particular license module.

Declaration
public Task<ModuleLicense> GetModuleLicenseFromDBAsync(string ownerName, string moduleName, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string ownerName

Name of the module owner.

string moduleName

Name of the license module.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<ModuleLicense>

Module License details, as it is stored in the database. NULL if not found.

GetModuleLicenseHistoryFromLicenseServerAsync(ExtendedLicenseInfo, ExtendedModuleLicense, CancellationToken)

Get details about a license from the license server.

Declaration
public Task<string> GetModuleLicenseHistoryFromLicenseServerAsync(ExtendedLicenseInfo licenseInfo, ExtendedModuleLicense moduleLicense, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ExtendedLicenseInfo licenseInfo

Description of the license

ExtendedModuleLicense moduleLicense

Information about a particular module to get information for.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<string>

Information about a particular license module.

GetSatelliteLicensesAsync(int, CancellationToken)

Obtain information about satellite module licenses

Declaration
public Task<LicenseOwner[]> GetSatelliteLicensesAsync(int satelliteId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int satelliteId

Satellite id to check for satellite module licenses

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<LicenseOwner[]>

Satellite module licenses grouped by owners.

GetShopUrlAsync(string, CancellationToken)

Get the shop URL for the specified module owner. This can be used to redirect user to the web shop.

Declaration
public Task<string> GetShopUrlAsync(string ownerName, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string ownerName

Name of the module owner.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<string>

The URL which contains the shop for the specified module owner.

GetThirdPartyLicenseAssignmentsAsync(int, string, CancellationToken)

Get license assignments for an associate for licenses belonging to an other module owner than SuperOffice

Declaration
public Task<ModuleLicenseLink[]> GetThirdPartyLicenseAssignmentsAsync(int associateId, string moduleOwner, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int associateId

User to get third party license assignments for

string moduleOwner

Name of the module owner to get license assignments for

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<ModuleLicenseLink[]>

Module license names

GetUserAndInstallationLicenceStatusAsync(int, CancellationToken)

Get status values for user licenses and installation license that can be used for feedback to the user.

Declaration
public Task<UserAndInstallationLicenceStatus> GetUserAndInstallationLicenceStatusAsync(int associateId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int associateId

Associate id to use when loading information about user licenses and installation license status.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<UserAndInstallationLicenceStatus>

An object that holds information for producing license status feedback to the user.

GetUserLicensesAsync(int, CancellationToken)

Obtain information about associate module licenses

Declaration
public Task<LicenseOwner[]> GetUserLicensesAsync(int associateId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int associateId

Associate id to check for associate module licenses

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<LicenseOwner[]>

Associate module licenses grouped by owners.

GetUserLicensesMDOListAsync(CancellationToken)

Get all licenses in a MDOListItem structure.

Declaration
public Task<SelectableMDOListItem[]> GetUserLicensesMDOListAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<SelectableMDOListItem[]>

Hierarchical structure of user licenses.

RemoveLicenseFromDBAsync(string, CancellationToken)

Remove the license from a particular module owner from the database. It is not permitted to remove licenses from SuperOffice

Declaration
public Task<LicenseResult> RemoveLicenseFromDBAsync(string moduleOwner, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string moduleOwner

Name of the module owner to remove license from.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<LicenseResult>

SaveCentralLicenseAsync(LicenseOwner[], CancellationToken)

Proxy class for the License Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.

Declaration
public Task<LicenseOwner[]> SaveCentralLicenseAsync(LicenseOwner[] license, CancellationToken cancellationToken = default)
Parameters
Type Name Description
LicenseOwner[] license
CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<LicenseOwner[]>

UnassignThirdPartyLicensesAsync(int, string, string[], CancellationToken)

Unassign (remove) third party licenses

Declaration
public Task<ModuleLicenseLink[]> UnassignThirdPartyLicensesAsync(int associateId, string moduleOwner, string[] moduleLicenseNames, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int associateId

User to unassign third party licenses for

string moduleOwner

Name of the module owner to unassign license for

string[] moduleLicenseNames

Name of module licenses to unassign (remove)

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<ModuleLicenseLink[]>

All module license names assigned

ValidateLicenseInfoAsync(ExtendedLicenseInfo, CancellationToken)

Validate that a license is consistant.

Declaration
public Task<LicenseResult> ValidateLicenseInfoAsync(ExtendedLicenseInfo licenseInfo, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ExtendedLicenseInfo licenseInfo

License to validate consistancy for

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<LicenseResult>

Implements

ILicenseAgent
IAgent
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top