LicenseHelper

StockSharp.Licensing

许可证的延期类别。

属性

CurrentPlatform
public static OSPlatform CurrentPlatform { get; }
value = LicenseHelper.CurrentPlatform

现行站台.

Licenses
public static IEnumerable<License> Licenses { get; }
value = LicenseHelper.Licenses

现有许可证。

方法

GetTimestampedType
public static Type GetTimestampedType(DateTime assemblyTimestamp)
result = LicenseHelper.GetTimestampedType(assemblyTimestamp)

获取带有指定时间戳的假类型 。

Remove
public static void Remove(License license)
LicenseHelper.Remove(license)

删去执照。

license
执照
Save
public static string Save(License license)
result = LicenseHelper.Save(license)

将许可证保存在本地磁盘上 。

license
执照

返回值: 档案名.

Save
public static string Save(License license, string path)
result = LicenseHelper.Save(license, path)

将许可证保存在本地磁盘上 。

license
执照
path
目标文件夹 。

返回值: 档案名.

ValidateLicense
public static string ValidateLicense(string featureName, string portfolioName, Type component)
result = LicenseHelper.ValidateLicense(featureName, portfolioName, component)

请检查date=中的日期值 (帮助) 。

featureName
特质
portfolioName
用于校验的帐号 。
component
构成部分。

返回值: 错误信息, 如果许可证不支持此特性 。

ValidateLicense2Async
public static ValueTask<ValueTuple<string, License>> ValidateLicense2Async(string featureName, string portfolioName, Type component, CancellationToken cancellationToken)
result = LicenseHelper.ValidateLicense2Async(featureName, portfolioName, component, cancellationToken)

请检查date=中的日期值 (帮助) 。

featureName
特质
portfolioName
用于校验的帐号 。
component
构成部分。
cancellationToken
CancellationToken.

返回值: 错误信息, 如果许可证不支持此特性 。

ValidateLicenseAsync
public static ValueTask<string> ValidateLicenseAsync(string featureName, string portfolioName, Type component, CancellationToken cancellationToken)
result = LicenseHelper.ValidateLicenseAsync(featureName, portfolioName, component, cancellationToken)

请检查date=中的日期值 (帮助) 。

featureName
特质
portfolioName
用于校验的帐号 。
component
构成部分。
cancellationToken
CancellationToken.

返回值: 错误信息, 如果许可证不支持此特性 。

事件

LicenseError
public static event Action<License, string> LicenseError
LicenseHelper.LicenseError += handler

许可证校验出错事件 。

LicensesChanged
public static event Action LicensesChanged
LicenseHelper.LicensesChanged += handler

许可证更改事件。

字段

ExcludeCurrentDirectory
public static bool ExcludeCurrentDirectory
value = LicenseHelper.ExcludeCurrentDirectory

不包括当前扫描可用许可证的目录 。

RenewOffset
public static readonly TimeSpan RenewOffset
value = LicenseHelper.RenewOffset

日期从当前许可证到期日中冲抵, 当它可以续签。 默认为2天 。

SpecialSplitter
public const string SpecialSplitter
value = LicenseHelper.SpecialSplitter

用于账户号码分离的特殊组合"!!!".