Class EmulationMessageAdapter
- Namespace
- StockSharp.Algo.Testing
- Assembly
- StockSharp.Algo.dll
Emulation message adapter.
public class EmulationMessageAdapter : MessageAdapterWrapper, IEmulationMessageAdapter, IMessageAdapterWrapper, IMessageAdapter, IMessageChannel, ICloneable<IMessageChannel>, ICloneable, IPersistable, ILogReceiver, ILogSource, IDisposable
- Inheritance
-
EmulationMessageAdapter
- Implements
-
ICloneable<IMessageChannel>IPersistable
- Inherited Members
- Extension Methods
Constructors
EmulationMessageAdapter(IMessageAdapter, IMessageChannel, bool, ISecurityProvider, IPortfolioProvider, IExchangeInfoProvider)
Initialize EmulationMessageAdapter.
public EmulationMessageAdapter(IMessageAdapter innerAdapter, IMessageChannel inChannel, bool isEmulationOnly, ISecurityProvider securityProvider, IPortfolioProvider portfolioProvider, IExchangeInfoProvider exchangeInfoProvider)
Parameters
innerAdapter
IMessageAdapterUnderlying adapter.
inChannel
IMessageChannelIncoming messages channel.
isEmulationOnly
boolAll messages do not contains real trading.
securityProvider
ISecurityProviderThe provider of information about instruments.
portfolioProvider
IPortfolioProviderThe portfolio to be used to register orders. If value is not given, the portfolio with default name Simulator will be created.
exchangeInfoProvider
IExchangeInfoProviderExchanges and trading boards provider.
Properties
Emulator
Emulator.
public IMarketEmulator Emulator { get; }
Property Value
InChannel
Incoming messages channel.
public IMessageChannel InChannel { get; }
Property Value
IsPositionsEmulationRequired
Adapter required emulation PositionChangeMessage.
public override bool? IsPositionsEmulationRequired { get; }
Property Value
- bool?
Remarks
IsSupportTransactionLog
Adapter translates orders changes on reply of OrderStatusMessage.
public override bool IsSupportTransactionLog { get; }
Property Value
Settings
Settings of exchange emulator.
public MarketEmulatorSettings Settings { get; }
Property Value
SupportedInMessages
Supported by adapter message types.
public override IEnumerable<MessageTypes> SupportedInMessages { get; }
Property Value
Methods
Clone()
Create a copy of EmulationMessageAdapter.
public override IMessageChannel Clone()
Returns
- IMessageChannel
Copy.
Dispose()
public override void Dispose()
InnerAdapterNewOutMessage(Message)
Process InnerAdapter output message.
protected override void InnerAdapterNewOutMessage(Message message)
Parameters
message
MessageThe message.
Load(SettingsStorage)
Load settings.
public override void Load(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.
OnInnerAdapterNewOutMessage(Message)
Process InnerAdapter output message.
protected override void OnInnerAdapterNewOutMessage(Message message)
Parameters
message
MessageThe message.
OnSendInMessage(Message)
Send message.
protected override bool OnSendInMessage(Message message)
Parameters
message
MessageMessage.
Returns
Save(SettingsStorage)
Save settings.
public override void Save(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.