SubscriptionRegistry

StockSharp.Algo.Strategies.Decomposed

Subscription tracking. Manages subscribe/unsubscribe, suspend/resume for rules.

Constructors

SubscriptionRegistry(IStrategyHost)

Subscription tracking. Manages subscribe/unsubscribe, suspend/resume for rules.

host
Strategy host.

Properties

IsRulesSuspended : bool

Whether rules are currently suspended.

Subscriptions : IEnumerable<Subscription>

All tracked subscriptions.

Methods

CanProcess(Subscription) : bool

Check if a subscription is tracked.

Reset()

Clear all subscriptions.

ResumeRules()

Resume subscription processing. Sends queued subscriptions.

Subscribe(Subscription, bool)

Subscribe and track. Auto-assigns TransactionId if needed. If rules are suspended, queues for later.

SuspendRules()

Suspend subscription processing (for rules).

TryGetById(long) : Subscription

Try to find subscription by transaction ID.

UnSubscribe(Subscription)

Unsubscribe. If suspended and not yet sent, just remove from queue.

UnSubscribeAll(bool)

Unsubscribe tracked subscriptions and remove them from strategy processing.

globalAndLocal
to include global lookup subscriptions.

Events

SubscriptionRequested : Action<Subscription>

Fires when a subscription should be sent to connector.

UnsubscriptionRequested : Action<Subscription>

Fires when an unsubscription should be sent to connector.