SubscriptionHolder

StockSharp.Messages

Subscription holder.

Inherits: Disposable

Constructors

SubscriptionHolder(ILogReceiver)

Subscription holder.

logs
Logs.

Properties

MaxTrackedItems : int

Maximum number of tracked helper entries.

Methods

Add(T)

Add new subscription.

info
Subscription.
AddUnsubscribeRequest(long, long)

Add unsubscribe request identifier.

transactionId
Request identifier.
originalTransactionId
ID of the original message TransactionId for which this message is a response.
Clear()

Clear state.

DisposeManaged()

Release resources.

GetSubscriptions(T) : IEnumerable<T>

Get subscriptions for the specified session.

session
Session.

Returns: Subscriptions.

GetSubscriptions(Message) : IEnumerable<T>

Get subscription for the specified message.

message
Message.

Returns: Subscriptions.

HasSubscriptions(DataType, SecurityId) : bool

Determines whether any subscription exists for the specified data type and security.

dataType
Data type info.
securityId
Security ID.

Returns: if any subscription exists; otherwise, .

Remove(T)

Remove all subscriptions for the specified session.

session
Session.

Returns: Subscriptions.

Remove(T)

Remove subscription.

info
Subscription.
TryGetById(long, T) : bool

Try to get a subscription by the specified identifier.

id
Identifier.
info
The found subscription, if any.

Returns: if a subscription with the specified identifier exists; otherwise, .

TryGetSubscription(long, SubscriptionStates?, T) : bool

Try to get the subscription by the specified identifier and switch to a new state if specified.

id
Identifier.
state
The state to set for the subscription, or to leave unchanged.
info
The found subscription, if any.

Returns: if the subscription was found; otherwise, .

TryGetSubscriptionAndStop(long, T) : bool

Try to get the subscription by the specified identifier and set its state to Stopped.

id
Identifier.
info
The found subscription, if any.

Returns: if the subscription was found; otherwise, .

Events

SubscriptionChanged : Action<T>

Subscription changed event.