Table of Contents

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)

public EmulationMessageAdapter(IMessageAdapter innerAdapter, IMessageChannel inChannel, bool isEmulationOnly, ISecurityProvider securityProvider, IPortfolioProvider portfolioProvider, IExchangeInfoProvider exchangeInfoProvider)

Parameters

innerAdapter IMessageAdapter

Underlying adapter.

inChannel IMessageChannel

Incoming messages channel.

isEmulationOnly bool

All messages do not contains real trading.

securityProvider ISecurityProvider

The provider of information about instruments.

portfolioProvider IPortfolioProvider

The portfolio to be used to register orders. If value is not given, the portfolio with default name Simulator will be created.

exchangeInfoProvider IExchangeInfoProvider

Exchanges and trading boards provider.

Properties

Emulator

Emulator.

public IMarketEmulator Emulator { get; }

Property Value

IMarketEmulator

InChannel

Incoming messages channel.

public IMessageChannel InChannel { get; }

Property Value

IMessageChannel

IsPositionsEmulationRequired

Adapter required emulation PositionChangeMessage.

public override bool? IsPositionsEmulationRequired { get; }

Property Value

bool?

Remarks

null means no emulatior, true by order balance, false by trades.

IsSupportTransactionLog

Adapter translates orders changes on reply of OrderStatusMessage.

public override bool IsSupportTransactionLog { get; }

Property Value

bool

Settings

Settings of exchange emulator.

public MarketEmulatorSettings Settings { get; }

Property Value

MarketEmulatorSettings

SupportedInMessages

Supported by adapter message types.

public override IEnumerable<MessageTypes> SupportedInMessages { get; }

Property Value

IEnumerable<MessageTypes>

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 Message

The message.

Load(SettingsStorage)

Load settings.

public override void Load(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

OnInnerAdapterNewOutMessage(Message)

Process InnerAdapter output message.

protected override void OnInnerAdapterNewOutMessage(Message message)

Parameters

message Message

The message.

OnSendInMessage(Message)

Send message.

protected override bool OnSendInMessage(Message message)

Parameters

message Message

Message.

Returns

bool

true if the specified message was processed successfully, otherwise, false.

Save(SettingsStorage)

Save settings.

public override void Save(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.