IBasketRoutingManager

StockSharp.Algo.Basket

Interface for managing message routing in basket adapter. Encapsulates all routing, connection, and subscription logic.

Propriedades

ConnectDisconnectEventOnFirstAdapter : bool

Gets or sets whether to fire connect/disconnect event on first adapter.

ConnectedCount : int

Gets the count of connected adapters.

HasPendingAdapters : bool

Gets whether there are adapters still connecting.

TransactionIdGenerator : IdGenerator

Transaction id generator used for internal child subscription routing. Must be kept in sync with the parent adapter's generator.

Métodos

AddOrderAdapter(long, IMessageAdapter)

Add order transaction to adapter mapping.

ApplyParentLookupId(ISubscriptionIdMessage) : bool

Apply parent lookup ID remapping to subscription message.

Retorna: if no valid parent found and message should be dropped.

BeginConnect()

Begin connection process.

BeginDisconnect()

Begin disconnection process.

GetAdaptersToDisconnect(Func<IMessageAdapter, IMessageAdapter>) : IDictionary<IMessageAdapter, IMessageAdapter>

Get adapters that need to be disconnected.

adapterLookup
Function to get wrapper from underlying adapter.

Retorna: Dictionary of wrapper to underlying adapter.

GetPortfolioAdapter(string, Func<IMessageAdapter, IMessageAdapter>) : IMessageAdapter

Get adapter for portfolio-based routing.

GetSubscribers(DataType) : long[]

Get subscriber IDs for a data type.

InitializeAdapter(IMessageAdapter)

Initialize adapter for connection.

LoadPortfolioAdapters(IEnumerable<ValueTuple<string, IMessageAdapter>>)

Clear and load portfolio adapter mappings.

LoadSecurityAdapters(IEnumerable<ValueTuple<ValueTuple<SecurityId, DataType>, IMessageAdapter>>)

Clear and load security adapter mappings.

OnAdapterRemoved(IMessageAdapter)

Called when an adapter is removed from the inner adapters list.

OnAdaptersCleared()

Called when all adapters are cleared from the inner adapters list.

OnPortfolioAdapterProviderChanged(string, Guid, bool, Func<Guid, IMessageAdapter>)

Handle portfolio adapter provider change.

ProcessBackMessage(IMessageAdapter, ISubscriptionMessage, Func<IMessageAdapter, IMessageAdapter>)

Process a back message with subscription tracking.

ProcessConnect(IMessageAdapter, IMessageAdapter, IEnumerable<MessageTypes>, Exception) : ValueTuple<IEnumerable<Message>, Message[], Message[]>

Process successful or failed connection.

adapter
The adapter that connected.
wrapper
The wrapper for the adapter.
supportedMessages
Supported message types.
error
Connection error if any.

Retorna: Extra messages to send out and pending messages to loop back.

ProcessDisconnect(IMessageAdapter, IMessageAdapter, IEnumerable<MessageTypes>, Exception) : IEnumerable<Message>

Process disconnection.

adapter
The adapter that disconnected.
wrapper
The wrapper for the adapter.
supportedMessages
Supported message types.
error
Disconnection error if any.

Retorna: Extra messages to send out.

ProcessInMessageAsync(Message, Func<IMessageAdapter, IMessageAdapter>, CancellationToken) : ValueTask<RoutingInResult>

Process an incoming message and determine routing decisions.

Reset(bool)

Reset all routing state.

clearPending
Whether to clear pending messages.
TryGetOrderAdapter(long, IMessageAdapter) : bool

Try get adapter for an order by its transaction ID.