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
-
IPersistableICloneable<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
EmulationMessageAdapterEmulation message adapter.
applyHeartbeat
boolApply on/off heartbeat mode for the specified adapter.
initChannels
boolInitialize channels.
Properties
CurrentTime
Current time, which will be passed to the Time.
public override DateTimeOffset CurrentTime { get; }
Property Value
EmulationAdapter
The adapter, executing messages in IMarketEmulator.
public EmulationMessageAdapter EmulationAdapter { get; }
Property Value
Portfolios
Get all portfolios.
public override IEnumerable<Portfolio> Portfolios { get; }
Property Value
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
SettingsStorageSettings storage.
OnProcessMessage(Message)
Process message.
protected override void OnProcessMessage(Message message)
Parameters
message
MessageMessage.
RegisterMarketDepth(MarketDepthGenerator)
To register the order books generator.
public Subscription RegisterMarketDepth(MarketDepthGenerator generator)
Parameters
generator
MarketDepthGeneratorThe order books generator.
Returns
- Subscription
Subscription.
RegisterOrderLog(OrderLogGenerator)
To register the orders log generator.
public Subscription RegisterOrderLog(OrderLogGenerator generator)
Parameters
generator
OrderLogGeneratorThe orders log generator.
Returns
- Subscription
Subscription.
RegisterTrades(TradeGenerator)
To register the trades generator.
public Subscription RegisterTrades(TradeGenerator generator)
Parameters
generator
TradeGeneratorThe trades generator.
Returns
- Subscription
Subscription.
Save(SettingsStorage)
Save settings.
public override void Save(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings 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
MarketDepthGeneratorThe 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
OrderLogGeneratorThe 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
TradeGeneratorThe trades generator.