AlertProcessingService

StockSharp.Alerts

Alert processing service.

Inherits: BaseLogReceiver

Implements: IAlertProcessingService, IAsyncPersistable, ILogSource, IDisposable

Constructors

AlertProcessingService
public AlertProcessingService(int maxQueue)
alertProcessingService = AlertProcessingService(maxQueue)

Initializes a new instance of the AlertProcessingService.

maxQueue
Max queue for process.

Properties

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

All schemas.

Methods

DisposeManaged
protected override void DisposeManaged()
alertProcessingService.DisposeManaged()

Disposes the managed resources. Override this method to add custom clean up of managed resources.

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.

Returns: A task that represents the asynchronous load operation.

Register
public void Register(AlertSchema schema)
alertProcessingService.Register(schema)

Register schema.

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.

Returns: A task that represents the asynchronous save operation.

Events

Registered
public event Action<AlertSchema> Registered
alertProcessingService.Registered += handler

Schema registration event.

UnRegistered
public event Action<AlertSchema> UnRegistered
alertProcessingService.UnRegistered += handler

Schema unregistering event.