Table of Contents

Class MessageAdapterWrapper

Namespace
StockSharp.Messages
Assembly
StockSharp.Messages.dll

Base implementation of IMessageAdapterWrapper.

public abstract class MessageAdapterWrapper : Cloneable<IMessageChannel>, IMessageAdapterWrapper, IMessageAdapter, IMessageChannel, ICloneable<IMessageChannel>, ICloneable, IPersistable, ILogReceiver, ILogSource, IDisposable
Inheritance
MessageAdapterWrapper
Implements
ICloneable<IMessageChannel>
IPersistable
Derived
Extension Methods

Constructors

MessageAdapterWrapper(IMessageAdapter)

protected MessageAdapterWrapper(IMessageAdapter innerAdapter)

Parameters

innerAdapter IMessageAdapter

Underlying adapter.

Properties

CandlesBuildFrom

Possible options for candles building.

public IEnumerable<Level1Fields> CandlesBuildFrom { get; }

Property Value

IEnumerable<Level1Fields>

Categories

Message adapter categories.

public virtual MessageAdapterCategories Categories { get; }

Property Value

MessageAdapterCategories

CheckTimeFrameByRequest

Check possible time-frame by request.

public bool CheckTimeFrameByRequest { get; }

Property Value

bool

CurrentTime

Current time, which will be passed to the Time.

public DateTimeOffset CurrentTime { get; }

Property Value

DateTimeOffset

HeartbeatInterval

Server check interval for track the connection alive. The value is Zero turned off tracking.

public TimeSpan HeartbeatInterval { get; set; }

Property Value

TimeSpan

InnerAdapter

Underlying adapter.

public IMessageAdapter InnerAdapter { get; set; }

Property Value

IMessageAdapter

IsFullCandlesOnly

Translates CandleMessage as only fully filled.

public virtual bool IsFullCandlesOnly { get; }

Property Value

bool

IsNativeIdentifiers

Identify security in messages by native identifier Native.

public virtual bool IsNativeIdentifiers { get; }

Property Value

bool

IsNativeIdentifiersPersistable

Native identifier can be stored.

public virtual bool IsNativeIdentifiersPersistable { get; }

Property Value

bool

IsPositionsEmulationRequired

Adapter required emulation PositionChangeMessage.

public virtual bool? IsPositionsEmulationRequired { get; }

Property Value

bool?

Remarks

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

IsSecurityNewsOnly

Adapter provides news related with specified security.

public virtual bool IsSecurityNewsOnly { get; }

Property Value

bool

IsSupportExecutionsPnL

Adapter fills PnL.

public virtual bool IsSupportExecutionsPnL { get; }

Property Value

bool

IsSupportOrderBookIncrements

Adapter translates incremental order books.

public virtual bool IsSupportOrderBookIncrements { get; }

Property Value

bool

IsSupportPartialDownloading

Support partial downloading.

public virtual bool IsSupportPartialDownloading { get; }

Property Value

bool

IsSupportSubscriptions

Support any subscriptions (ticks, order books etc.).

public virtual bool IsSupportSubscriptions { get; }

Property Value

bool

IsSupportTransactionLog

Adapter translates orders changes on reply of OrderStatusMessage.

public virtual bool IsSupportTransactionLog { get; }

Property Value

bool

OwnInnerAdapter

Control InnerAdapter lifetime.

public bool OwnInnerAdapter { get; set; }

Property Value

bool

Parent

Parental logs source.

public virtual ILogSource Parent { get; set; }

Property Value

ILogSource

PossibleSupportedMessages

Possible supported by adapter message types.

public virtual IEnumerable<MessageTypeInfo> PossibleSupportedMessages { get; }

Property Value

IEnumerable<MessageTypeInfo>

ReConnectionSettings

Connection tracking settings IMessageAdapter with a server.

public ReConnectionSettings ReConnectionSettings { get; }

Property Value

ReConnectionSettings

SendInBackFurther

Auto send BackMode messages to InnerAdapter.

protected virtual bool SendInBackFurther { get; }

Property Value

bool

StorageName

The storage name, associated with the adapter.

public string StorageName { get; }

Property Value

string

SupportedInMessages

Supported by adapter message types.

public virtual IEnumerable<MessageTypes> SupportedInMessages { get; set; }

Property Value

IEnumerable<MessageTypes>

SupportedMarketDataTypes

Supported by adapter market data types.

public virtual IEnumerable<DataType> SupportedMarketDataTypes { get; }

Property Value

IEnumerable<DataType>

SupportedOrderBookDepths

Available options for MaxDepth.

public virtual IEnumerable<int> SupportedOrderBookDepths { get; }

Property Value

IEnumerable<int>

SupportedResultMessages

Supported by adapter result message types.

public virtual IEnumerable<MessageTypes> SupportedResultMessages { get; }

Property Value

IEnumerable<MessageTypes>

TransactionIdGenerator

Transaction id generator.

public IdGenerator TransactionIdGenerator { get; }

Property Value

IdGenerator

Methods

Dispose()

public virtual void Dispose()

GetCandleArgs(Type, SecurityId, DateTimeOffset?, DateTimeOffset?)

Get possible args for the specified candle type and instrument.

public virtual IEnumerable<object> GetCandleArgs(Type candleType, SecurityId securityId, DateTimeOffset? from, DateTimeOffset? to)

Parameters

candleType Type

The type of the message CandleMessage.

securityId SecurityId

Security ID.

from DateTimeOffset?

The initial date from which you need to get data.

to DateTimeOffset?

The final date by which you need to get data.

Returns

IEnumerable<object>

Possible args.

GetHistoryStepSize(SecurityId, DataType, out TimeSpan)

Get maximum size step allowed for historical download.

public virtual TimeSpan GetHistoryStepSize(SecurityId securityId, DataType dataType, out TimeSpan iterationInterval)

Parameters

securityId SecurityId

SecurityId

dataType DataType

Data type info.

iterationInterval TimeSpan

Interval between iterations.

Returns

TimeSpan

Step.

GetMaxCount(DataType)

Get maximum possible items count per single subscription request.

public virtual int? GetMaxCount(DataType dataType)

Parameters

dataType DataType

Data type info.

Returns

int?

Max items count.

GetSupportedDataTypes(SecurityId)

Get supported data types for the specified SecurityId.

public virtual IEnumerable<DataType> GetSupportedDataTypes(SecurityId securityId)

Parameters

securityId SecurityId

SecurityId

Returns

IEnumerable<DataType>

Supported data types.

InnerAdapterNewOutMessage(Message)

Process InnerAdapter output message.

protected virtual void InnerAdapterNewOutMessage(Message message)

Parameters

message Message

The message.

IsAllDownloadingSupported(DataType)

Is for the specified dataType all securities downloading enabled.

public virtual bool IsAllDownloadingSupported(DataType dataType)

Parameters

dataType DataType

Data type info.

Returns

bool

Check result.

IsSecurityRequired(DataType)

Support filtering subscriptions (subscribe/unsubscribe for specified security).

public virtual bool IsSecurityRequired(DataType dataType)

Parameters

dataType DataType

Data type info.

Returns

bool

Check result.

IsSupportCandlesPriceLevels(MarketDataMessage)

Support candles PriceLevels.

public virtual bool IsSupportCandlesPriceLevels(MarketDataMessage subscription)

Parameters

subscription MarketDataMessage

MarketDataMessage

Returns

bool

Check result.

IsSupportCandlesUpdates(MarketDataMessage)

Support candles subscription and live updates.

public virtual bool IsSupportCandlesUpdates(MarketDataMessage subscription)

Parameters

subscription MarketDataMessage

MarketDataMessage

Returns

bool

Check result.

Load(SettingsStorage)

Load settings.

public virtual void Load(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

OnInnerAdapterNewOutMessage(Message)

Process InnerAdapter output message.

protected virtual void OnInnerAdapterNewOutMessage(Message message)

Parameters

message Message

The message.

OnSendInMessage(Message)

Send message.

protected virtual bool OnSendInMessage(Message message)

Parameters

message Message

Message.

Returns

bool

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

RaiseNewOutMessage(Message)

To call the event NewOutMessage.

protected void RaiseNewOutMessage(Message message)

Parameters

message Message

The message.

Save(SettingsStorage)

Save settings.

public virtual void Save(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

SendInMessage(Message)

Send message.

public virtual bool SendInMessage(Message message)

Parameters

message Message

Message.

Returns

bool

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

ToString()

public override string ToString()

Returns

string

Events

NewOutMessage

New message event.

public event Action<Message> NewOutMessage

Event Type

Action<Message>

ParentRemoved

Parent removed.

public event Action<ILogSource> ParentRemoved

Event Type

Action<ILogSource>