LicenseHelper

StockSharp.Licensing

Extension class for licenses.

Properties

CurrentPlatform : OSPlatform

Current platform.

Licenses : IEnumerable<License>

Available licenses.

Methods

GetTimestampedType(DateTime) : Type

Get fake type with specified timestamp.

Remove(License)

Delete license.

license
License.
Save(License) : string

Save the license on local disk.

license
License.

Returns: File name.

Save(License, string) : string

Save the license on local disk.

license
License.
path
Destination folder.

Returns: File name.

ValidateLicense(string, string, Type) : string

Check the license supported the feature.

featureName
Feature.
portfolioName
The account number that will be used for verification.
component
Component.

Returns: Error info, if the license does not support the feature.

ValidateLicense2Async(string, string, Type, CancellationToken) : ValueTask<ValueTuple<string, License>>

Check the license supported the feature.

featureName
Feature.
portfolioName
The account number that will be used for verification.
component
Component.
cancellationToken
CancellationToken.

Returns: Error info, if the license does not support the feature.

ValidateLicenseAsync(string, string, Type, CancellationToken) : ValueTask<string>

Check the license supported the feature.

featureName
Feature.
portfolioName
The account number that will be used for verification.
component
Component.
cancellationToken
CancellationToken.

Returns: Error info, if the license does not support the feature.

Events

LicenseError : Action<License, string>

License verification error event.

LicensesChanged : Action

Licenses change event.

Fields

ExcludeCurrentDirectory : bool

Exclude current directory for scan available licenses.

RenewOffset : TimeSpan

Date offset from the expiry date of the current license, when it can be renewed. The default is 2 days.

SpecialSplitter : string

The special combination of '!!!' for the separation of account numbers.