SubscriptionRegistry

StockSharp.Algo.Strategies.Decomposed

Subscription Tracking: Verwaltet Subscript/Unsubscribe, Suspend/Resume für Regeln.

Konstruktoren

SubscriptionRegistry
public SubscriptionRegistry(IStrategyHost host)
subscriptionRegistry = SubscriptionRegistry(host)

Subscription Tracking: Verwaltet Subscript/Unsubscribe, Suspend/Resume für Regeln.

host
Strategie-Host.

Eigenschaften

IsRulesSuspended
public bool IsRulesSuspended { get; }
value = subscriptionRegistry.IsRulesSuspended

Ob die Regeln derzeit ausgesetzt sind.

Subscriptions
public IEnumerable<Subscription> Subscriptions { get; }
value = subscriptionRegistry.Subscriptions

Alle verfolgten Abonnements.

Methoden

CanProcess
public bool CanProcess(Subscription subscription)
result = subscriptionRegistry.CanProcess(subscription)

Prüfen Sie, ob ein Abonnement verfolgt wird.

Reset
public void Reset()
subscriptionRegistry.Reset()

Löschen Sie alle Abonnements.

ResumeRules
public void ResumeRules()
subscriptionRegistry.ResumeRules()

Abo-Verarbeitung fortsetzen. Abo-Abonnements in Warteschlangen senden.

Subscribe
public void Subscribe(Subscription subscription, bool isGlobal)
subscriptionRegistry.Subscribe(subscription, isGlobal)

Abonnieren und verfolgen. Auto-zuweisen TransactionId, falls erforderlich. Wenn Regeln ausgesetzt sind, Warteschlangen für später.

SuspendRules
public void SuspendRules()
subscriptionRegistry.SuspendRules()

Subscription Processing (für Regeln) aussetzen.

TryGetById
public Subscription TryGetById(long transactionId)
result = subscriptionRegistry.TryGetById(transactionId)

Versuchen Sie, das Abonnement nach Transaktions-ID zu finden.

UnSubscribe
public void UnSubscribe(Subscription subscription)
subscriptionRegistry.UnSubscribe(subscription)

Wenn Sie suspendiert und noch nicht gesendet wurden, entfernen Sie einfach aus der Warteschlange.

UnSubscribeAll
public void UnSubscribeAll(bool globalAndLocal)
subscriptionRegistry.UnSubscribeAll(globalAndLocal)

Abmelden Sie verfolgte Abonnements und entfernen Sie sie aus der Strategieverarbeitung.

globalAndLocal
Globale Lookup-Abonnements einzuschließen.

Ereignisse

SubscriptionRequested
public event Action<Subscription> SubscriptionRequested
subscriptionRegistry.SubscriptionRequested += handler

Bricht, wenn ein Abonnement an connector gesendet werden soll.

UnsubscriptionRequested
public event Action<Subscription> UnsubscriptionRequested
subscriptionRegistry.UnsubscriptionRequested += handler

Bricht, wenn eine Abmeldung an connector gesendet werden sollte.