Class BasketMessageAdapter
- Namespace
- StockSharp.Algo
- Assembly
- StockSharp.Algo.dll
Adapter-aggregator that allows simultaneously to operate multiple adapters connected to different trading systems.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Basket")]
public class BasketMessageAdapter : BaseLogReceiver, IMessageAdapter, IMessageChannel, ICloneable<IMessageChannel>, ICloneable, IPersistable, ILogReceiver, ILogSource, IDisposable
- Inheritance
-
BasketMessageAdapter
- Implements
-
ICloneable<IMessageChannel>IPersistable
- Inherited Members
- Extension Methods
Constructors
BasketMessageAdapter(IdGenerator, CandleBuilderProvider)
Initializes a new instance of the BasketMessageAdapter.
public BasketMessageAdapter(IdGenerator transactionIdGenerator, CandleBuilderProvider candleBuilderProvider)
Parameters
transactionIdGenerator
IdGeneratorTransaction id generator.
candleBuilderProvider
CandleBuilderProviderCandle builders provider.
BasketMessageAdapter(IdGenerator, CandleBuilderProvider, ISecurityMessageAdapterProvider, IPortfolioMessageAdapterProvider)
Initializes a new instance of the BasketMessageAdapter.
public BasketMessageAdapter(IdGenerator transactionIdGenerator, CandleBuilderProvider candleBuilderProvider, ISecurityMessageAdapterProvider securityAdapterProvider, IPortfolioMessageAdapterProvider portfolioAdapterProvider)
Parameters
transactionIdGenerator
IdGeneratorTransaction id generator.
candleBuilderProvider
CandleBuilderProviderCandle builders provider.
securityAdapterProvider
ISecurityMessageAdapterProviderThe security based message adapter's provider.
portfolioAdapterProvider
IPortfolioMessageAdapterProviderThe portfolio based message adapter's provider.
Properties
CommissionManager
The commission calculating manager.
public ICommissionManager CommissionManager { get; set; }
Property Value
ConnectDisconnectEventOnFirstAdapter
To call the ConnectMessage event when the first adapter connects to InnerAdapters.
public bool ConnectDisconnectEventOnFirstAdapter { get; set; }
Property Value
ExtendedInfoStorage
Extended info storage.
public IExtendedInfoStorage ExtendedInfoStorage { get; set; }
Property Value
FillGapsBehaviour
public IFillGapsBehaviour FillGapsBehaviour { get; set; }
Property Value
IgnoreExtraAdapters
Do not add extra adapters.
public bool IgnoreExtraAdapters { get; set; }
Property Value
InnerAdapters
Adapters with which the aggregator operates.
public IInnerAdapterList InnerAdapters { get; }
Property Value
IsRestoreSubscriptionOnErrorReconnect
Restore subscription on reconnect.
public bool IsRestoreSubscriptionOnErrorReconnect { get; set; }
Property Value
Remarks
Error case like connection lost etc.
IsSecurityNewsOnly
Adapter provides news related with specified security.
public bool IsSecurityNewsOnly { get; }
Property Value
IsSupportPositionEmulation
public bool IsSupportPositionEmulation { get; set; }
Property Value
IsSupportTransactionLog
public bool IsSupportTransactionLog { get; set; }
Property Value
LatencyManager
Orders registration delay calculation manager.
public ILatencyManager LatencyManager { get; set; }
Property Value
Level1Extend
public bool Level1Extend { get; set; }
Property Value
NativeIdStorage
Security native identifier storage.
public INativeIdStorage NativeIdStorage { get; set; }
Property Value
PnLManager
The profit-loss manager.
public IPnLManager PnLManager { get; set; }
Property Value
PortfolioAdapterProvider
The portfolio based message adapter's provider.
public IPortfolioMessageAdapterProvider PortfolioAdapterProvider { get; }
Property Value
SecurityAdapterProvider
The security based message adapter's provider.
public ISecurityMessageAdapterProvider SecurityAdapterProvider { get; }
Property Value
SecurityMappingStorage
Security identifier mappings storage.
public ISecurityMappingStorage SecurityMappingStorage { get; set; }
Property Value
SendFinishedCandlesImmediatelly
public bool SendFinishedCandlesImmediatelly { get; set; }
Property Value
SlippageManager
Slippage manager.
public ISlippageManager SlippageManager { get; set; }
Property Value
StorageProcessor
Storage processor.
public StorageProcessor StorageProcessor { get; }
Property Value
StorageSettings
Storage settings.
public StorageCoreSettings StorageSettings { get; }
Property Value
SupportBuildingFromOrderLog
public bool SupportBuildingFromOrderLog { get; set; }
Property Value
SupportCandlesCompression
public bool SupportCandlesCompression { get; set; }
Property Value
SupportLookupTracking
public bool SupportLookupTracking { get; set; }
Property Value
SupportOffline
public bool SupportOffline { get; set; }
Property Value
SupportOrderBookTruncate
public bool SupportOrderBookTruncate { get; set; }
Property Value
SupportPartialDownload
public bool SupportPartialDownload { get; set; }
Property Value
SupportSecurityAll
public bool SupportSecurityAll { get; set; }
Property Value
SupportStorage
public bool SupportStorage { get; set; }
Property Value
SuppressReconnectingErrors
Suppress reconnecting errors.
public bool SuppressReconnectingErrors { get; set; }
Property Value
TransactionIdGenerator
Transaction id generator.
public IdGenerator TransactionIdGenerator { get; set; }
Property Value
- IdGenerator
UseChannels
Use channels for in and out messages.
public bool UseChannels { get; set; }
Property Value
Methods
ApplyHeartbeat(IMessageAdapter, bool)
Apply on/off heartbeat mode for the specified adapter.
public void ApplyHeartbeat(IMessageAdapter adapter, bool on)
Parameters
adapter
IMessageAdapterAdapter.
on
boolIs active.
Clone()
Create a copy of BasketMessageAdapter.
public IMessageChannel Clone()
Returns
- IMessageChannel
Copy.
DisposeManaged()
To release allocated resources.
protected override void DisposeManaged()
GetSortedAdapters()
To get adapters SortedAdapters sorted by the specified priority. By default, there is no sorting.
protected IEnumerable<IMessageAdapter> GetSortedAdapters()
Returns
- IEnumerable<IMessageAdapter>
Sorted adapters.
Load(SettingsStorage)
Load settings.
public override void Load(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.
OnInnerAdapterNewOutMessage(IMessageAdapter, Message)
The embedded adapter event NewOutMessage handler.
protected virtual void OnInnerAdapterNewOutMessage(IMessageAdapter innerAdapter, Message message)
Parameters
innerAdapter
IMessageAdapterThe embedded adapter.
message
MessageMessage.
OnSendInMessage(Message)
Send message.
protected virtual bool OnSendInMessage(Message message)
Parameters
message
MessageMessage.
Returns
OnSendOutMessage(Message)
Send outgoing message and raise NewOutMessage event.
protected virtual void OnSendOutMessage(Message message)
Parameters
message
MessageMessage.
Save(SettingsStorage)
Save settings.
public override void Save(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.
TryGetAdapter(string, out IMessageAdapter)
Try find adapter by portfolio name.
public bool TryGetAdapter(string porfolioName, out IMessageAdapter adapter)
Parameters
porfolioName
stringPortfolio name.
adapter
IMessageAdapter
Returns
- bool
Found IMessageAdapter.
Events
NewOutMessage
New message event.
public event Action<Message> NewOutMessage