SessionSubscriptions

StockSharp.Server.Core

The subscriptions of a protocol server, held apart for each client session.

Наследует: Disposable

Конструкторы

SessionSubscriptions
public SessionSubscriptions(ILogReceiver logs)
sessionSubscriptions = SessionSubscriptions(logs)

The subscriptions of a protocol server, held apart for each client session.

logs
Where a message no single session can be told it is for is reported.

Методы

Add
public void Add(TSubscription info)
sessionSubscriptions.Add(info)

Adds a subscription to the session that opened it.

info
The subscription.
AddCommand
public void AddCommand(TSubscription info)
sessionSubscriptions.AddCommand(info)

Adds the subscription an order command runs under, taking its number over from an earlier command of the same session.

info
The command's subscription.
AddUnsubscribeRequest
public void AddUnsubscribeRequest(TSession session, long transactionId, long originalTransactionId)
sessionSubscriptions.AddUnsubscribeRequest(session, transactionId, originalTransactionId)

Notes that a session asked to end one of its subscriptions.

session
The session.
transactionId
The number the ask runs under.
originalTransactionId
The number of the subscription it ends.
Clear
public void Clear()
sessionSubscriptions.Clear()

Removes every session's subscriptions.

DisposeManaged
protected override void DisposeManaged()
sessionSubscriptions.DisposeManaged()

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

GetSubscriptions
public IEnumerable<TSubscription> GetSubscriptions(TSession session)
result = sessionSubscriptions.GetSubscriptions(session)

The subscriptions of a session.

session
The session.

Возвращает: The subscriptions.

GetSubscriptions
public TSubscription[] GetSubscriptions(TSession addressee, Message message)
result = sessionSubscriptions.GetSubscriptions(addressee, message)

The subscriptions a message goes to.

addressee
The session the module addressed it to, or for none.
message
The message.

Возвращает: The subscriptions.

HasSubscriptions
public bool HasSubscriptions(DataType dataType, SecurityId securityId)
result = sessionSubscriptions.HasSubscriptions(dataType, securityId)

Whether any session watches a kind of data on a security.

dataType
The kind of data.
securityId
The security.

Возвращает: when one does.

IsHeld
public bool IsHeld(long id)
result = sessionSubscriptions.IsHeld(id)

Whether any session holds a subscription under a number.

id
The number.

Возвращает: when one does.

IsHeldElsewhere
public bool IsHeldElsewhere(TSession session, long id)
result = sessionSubscriptions.IsHeldElsewhere(session, id)

Whether a number a session named is one only another session holds.

session
The session that named it.
id
The number.

Возвращает: when the session holds nothing under it and another session does.

Remove
public IEnumerable<TSubscription> Remove(TSession session)
result = sessionSubscriptions.Remove(session)

Removes everything a session subscribed to.

session
The session.

Возвращает: The subscriptions it held.

Remove
public void Remove(TSubscription info)
sessionSubscriptions.Remove(info)

Removes one subscription.

info
The subscription.
TryGetById
public bool TryGetById(TSession session, long id, TSubscription info)
result = sessionSubscriptions.TryGetById(session, id, info)

The subscription a session opened under a number.

session
The session.
id
The number.
info
The subscription.

Возвращает: when the session holds one under that number.

TryGetSubscriptionAndStop
public bool TryGetSubscriptionAndStop(TSession session, long id, TSubscription info)
result = sessionSubscriptions.TryGetSubscriptionAndStop(session, id, info)

Stops the subscription a session opened under a number.

session
The session.
id
The number.
info
The subscription.

Возвращает: when the session held one under that number.

События

SubscriptionChanged
public event Action<TSubscription> SubscriptionChanged
sessionSubscriptions.SubscriptionChanged += handler

A subscription changed its state.