AlertProcessingService
StockSharp.Alerts
警报处理服务。
继承自: BaseLogReceiver
实现: IAlertProcessingService, IAsyncPersistable, ILogSource, IDisposable
构造函数
AlertProcessingService
public AlertProcessingService(int maxQueue)
alertProcessingService = AlertProcessingService(maxQueue)
初始化了 & ##AlertProcessingService+#的新实例.
- maxQueue
- 进程的最大队列 。
属性
DroppedMessages
public long DroppedMessages { get; }
value = alertProcessingService.DroppedMessages
Number of messages dropped because the processing queue was full.
Schemas
public IEnumerable<AlertSchema> Schemas { get; }
value = alertProcessingService.Schemas
全部的计谋。
方法
DisposeManaged
protected override void DisposeManaged()
alertProcessingService.DisposeManaged()
释放资源。
LoadAsync
public override Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = alertProcessingService.LoadAsync(storage, cancellationToken)
Asynchronously loads the state of the object from the specified SettingsStorage.
- storage
- The SettingsStorage instance from which to load the data.
- cancellationToken
- A token to monitor for cancellation requests.
返回值: A task that represents the asynchronous load operation.
Register
public void Register(AlertSchema schema)
alertProcessingService.Register(schema)
注册计划。
- schema
- 司马相.
SaveAsync
public override Task SaveAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = alertProcessingService.SaveAsync(storage, cancellationToken)
Asynchronously saves the state of the object to the specified SettingsStorage.
- storage
- The SettingsStorage instance to which to save the data.
- cancellationToken
- A token to monitor for cancellation requests.
返回值: A task that represents the asynchronous save operation.
事件
Registered
public event Action<AlertSchema> Registered
alertProcessingService.Registered += handler
司马注册事件.
UnRegistered
public event Action<AlertSchema> UnRegistered
alertProcessingService.UnRegistered += handler
斯克马未注册事件.