Table of Contents

Class SubscriptionHolder<TSubcription, TSession, TRequestId>

Namespace
StockSharp.Server.Core
Assembly
StockSharp.Server.Core.dll

Subscription holder.

public class SubscriptionHolder<TSubcription, TSession, TRequestId> where TSubcription : SubscriptionInfo<TSession, TRequestId> where TSession : class, IMessageListenerSession

Type Parameters

TSubcription

Subscription type.

TSession

Session type.

TRequestId

Request identifier type.

Inheritance
SubscriptionHolder<TSubcription, TSession, TRequestId>
Inherited Members
Extension Methods

Constructors

SubscriptionHolder(IMessageListener)

Initializes a new instance of the SubscriptionHolder<TSubcription, TSession, TRequestId>.

public SubscriptionHolder(IMessageListener server)

Parameters

server IMessageListener

Server.

Methods

Add(TSubcription)

Add new subscription.

public void Add(TSubcription info)

Parameters

info TSubcription

Subscription.

AddUnsubscribeRequest(long, long)

Add unsubscribe request identifier.

public void AddUnsubscribeRequest(long transactionId, long originalTransactionId)

Parameters

transactionId long

Request identifier.

originalTransactionId long

ID of the original message TransactionId for which this message is a response.

Clear()

Clear state.

public void Clear()

GetSubscriptions(Message)

Get subscription for the specified message.

public IEnumerable<TSubcription> GetSubscriptions(Message message)

Parameters

message Message

Message.

Returns

IEnumerable<TSubcription>

Subscriptions.

GetSubscriptions(IMessageListenerSession)

Get subscription for the specified session.

public IEnumerable<TSubcription> GetSubscriptions(IMessageListenerSession session)

Parameters

session IMessageListenerSession

Session.

Returns

IEnumerable<TSubcription>

Subscriptions.

HasSubscriptions(DataType, SecurityId)

Determines has subscription for the specified data type and security.

public bool HasSubscriptions(DataType dataType, SecurityId securityId)

Parameters

dataType DataType

Data type info.

securityId SecurityId

Security ID.

Returns

bool

Check result.

Remove(TSubcription)

Remove subscription.

public void Remove(TSubcription info)

Parameters

info TSubcription

Subscription.

Remove(TSession)

Remove session.

public IEnumerable<TSubcription> Remove(TSession session)

Parameters

session TSession

Session.

Returns

IEnumerable<TSubcription>

Subscriptions.

TryGetById(long)

Try get subscription by the specified identifier.

public TSubcription TryGetById(long id)

Parameters

id long

Identifier.

Returns

TSubcription

Subscription.

TryGetSubscription(long, SubscriptionStates?)

Try get subscription by the specified identifier and swith into new state.

public TSubcription TryGetSubscription(long id, SubscriptionStates? state)

Parameters

id long

Identifier.

state SubscriptionStates?

State.

Returns

TSubcription

Subscription.

TryGetSubscriptionAndStop(long)

Try get and stop subscription by the specified identifier.

public TSubcription TryGetSubscriptionAndStop(long id)

Parameters

id long

Identifier.

Returns

TSubcription

Subscription.

Events

SubscriptionChanged

Subscription changed event.

public event Action<TSubcription> SubscriptionChanged

Event Type

Action<TSubcription>