SubscriptionHolder

StockSharp.Messages

Subscription holder.

继承自: Disposable

构造函数

SubscriptionHolder(ILogReceiver)

Subscription holder.

logs
Logs.

属性

MaxTrackedItems : int

Maximum number of tracked helper entries.

方法

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.

返回值: Subscriptions.

GetSubscriptions(Message) : IEnumerable<T>

Get subscription for the specified message.

message
Message.

返回值: Subscriptions.

HasSubscriptions(DataType, SecurityId) : bool

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

dataType
Data type info.
securityId
Security ID.

返回值: if any subscription exists; otherwise, .

Remove(T)

Remove all subscriptions for the specified session.

session
Session.

返回值: 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.

返回值: 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.

返回值: 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.

返回值: if the subscription was found; otherwise, .

事件

SubscriptionChanged : Action<T>

Subscription changed event.