ISubscriptionProviderAsyncExtensions

StockSharp.BusinessEntities

Async extensions for ISubscriptionProvider.

Métodos

SubscribeAsync(ISubscriptionProvider, Subscription, CancellationToken) : ValueTask

Subscribe, wait for start, and keep it active until is canceled. On cancellation the method will call Subscription) and complete after the subscription is stopped.

provider
Subscription provider.
subscription
Subscription to manage.
cancellationToken
Cancellation token that triggers unsubscription.

Devuelve: A ValueTask that completes after the subscription is stopped (due to cancellation or failure).

SubscribeAsync``1(ISubscriptionProvider, Subscription)

Subscribe and get an async stream of incoming data of type for the specified . Use .WithCancellation(token) to cancel, which triggers Subscription). The stream completes when the subscription stops or fails.

provider
Subscription provider.
subscription
Target subscription.

Devuelve: Async stream of incoming data objects for the given subscription filtered to .