Table of Contents

Class BaseEmulationConnector

Namespace
StockSharp.Algo.Testing
Assembly
StockSharp.Algo.dll

The base connection of emulation.

public abstract class BaseEmulationConnector : Connector, IConnector, IPersistable, ILogReceiver, ILogSource, IMarketDataProvider, ITransactionProvider, IPositionProvider, IPortfolioProvider, ISecurityProvider, ISecurityMessageProvider, INewsProvider, IMessageChannel, IDisposable, ICloneable<IMessageChannel>, ICloneable, ISubscriptionProvider
Inheritance
BaseEmulationConnector
Implements
IPersistable
ICloneable<IMessageChannel>
Derived
Inherited Members
Extension Methods

Constructors

BaseEmulationConnector(EmulationMessageAdapter, bool, bool)

Initializes a new instance of the BaseEmulationConnector.

protected BaseEmulationConnector(EmulationMessageAdapter emulationAdapter, bool applyHeartbeat, bool initChannels)

Parameters

emulationAdapter EmulationMessageAdapter

Emulation message adapter.

applyHeartbeat bool

Apply on/off heartbeat mode for the specified adapter.

initChannels bool

Initialize channels.

Properties

CurrentTime

Current time, which will be passed to the Time.

public override DateTimeOffset CurrentTime { get; }

Property Value

DateTimeOffset

EmulationAdapter

The adapter, executing messages in IMarketEmulator.

public EmulationMessageAdapter EmulationAdapter { get; }

Property Value

EmulationMessageAdapter

Portfolios

Get all portfolios.

public override IEnumerable<Portfolio> Portfolios { get; }

Property Value

IEnumerable<Portfolio>

Methods

ClearCache()

Clear cache.

public override void ClearCache()

DisposeManaged()

To release allocated resources. In particular, to disconnect from the trading system via Disconnect().

protected override void DisposeManaged()

Load(SettingsStorage)

Load settings.

public override void Load(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

OnProcessMessage(Message)

Process message.

protected override void OnProcessMessage(Message message)

Parameters

message Message

Message.

RegisterMarketDepth(MarketDepthGenerator)

To register the order books generator.

public Subscription RegisterMarketDepth(MarketDepthGenerator generator)

Parameters

generator MarketDepthGenerator

The order books generator.

Returns

Subscription

Subscription.

RegisterOrderLog(OrderLogGenerator)

To register the orders log generator.

public Subscription RegisterOrderLog(OrderLogGenerator generator)

Parameters

generator OrderLogGenerator

The orders log generator.

Returns

Subscription

Subscription.

RegisterTrades(TradeGenerator)

To register the trades generator.

public Subscription RegisterTrades(TradeGenerator generator)

Parameters

generator TradeGenerator

The trades generator.

Returns

Subscription

Subscription.

Save(SettingsStorage)

Save settings.

public override void Save(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

UnRegisterMarketDepth(MarketDepthGenerator)

To delete the order books generator, earlier registered through RegisterMarketDepth(MarketDepthGenerator).

[Obsolete("Uses UnSubscribe method.")]
public void UnRegisterMarketDepth(MarketDepthGenerator generator)

Parameters

generator MarketDepthGenerator

The order books generator.

UnRegisterOrderLog(OrderLogGenerator)

To delete the orders log generator, earlier registered through RegisterOrderLog(OrderLogGenerator).

[Obsolete("Uses UnSubscribe method.")]
public void UnRegisterOrderLog(OrderLogGenerator generator)

Parameters

generator OrderLogGenerator

The orders log generator.

UnRegisterTrades(TradeGenerator)

To delete the trades generator, registered earlier through RegisterTrades(TradeGenerator).

[Obsolete("Uses UnSubscribe method.")]
public void UnRegisterTrades(TradeGenerator generator)

Parameters

generator TradeGenerator

The trades generator.