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)
Initialize MessageAdapterWrapper.
protected MessageAdapterWrapper(IMessageAdapter innerAdapter)
Parameters
innerAdapter
IMessageAdapterUnderlying adapter.
Properties
CandlesBuildFrom
Possible options for candles building.
public IEnumerable<Level1Fields> CandlesBuildFrom { get; }
Property Value
Categories
Message adapter categories.
public virtual MessageAdapterCategories Categories { get; }
Property Value
CheckTimeFrameByRequest
Check possible time-frame by request.
public bool CheckTimeFrameByRequest { get; }
Property Value
CurrentTime
Current time, which will be passed to the Time.
public DateTimeOffset CurrentTime { get; }
Property Value
HeartbeatInterval
Server check interval for track the connection alive. The value is Zero turned off tracking.
public TimeSpan HeartbeatInterval { get; set; }
Property Value
InnerAdapter
Underlying adapter.
public IMessageAdapter InnerAdapter { get; set; }
Property Value
IsFullCandlesOnly
Translates CandleMessage as only fully filled.
public virtual bool IsFullCandlesOnly { get; }
Property Value
IsNativeIdentifiers
Identify security in messages by native identifier Native.
public virtual bool IsNativeIdentifiers { get; }
Property Value
IsNativeIdentifiersPersistable
Native identifier can be stored.
public virtual bool IsNativeIdentifiersPersistable { get; }
Property Value
IsPositionsEmulationRequired
Adapter required emulation PositionChangeMessage.
public virtual bool? IsPositionsEmulationRequired { get; }
Property Value
- bool?
Remarks
IsSecurityNewsOnly
Adapter provides news related with specified security.
public virtual bool IsSecurityNewsOnly { get; }
Property Value
IsSupportExecutionsPnL
Adapter fills PnL.
public virtual bool IsSupportExecutionsPnL { get; }
Property Value
IsSupportOrderBookIncrements
Adapter translates incremental order books.
public virtual bool IsSupportOrderBookIncrements { get; }
Property Value
IsSupportPartialDownloading
Support partial downloading.
public virtual bool IsSupportPartialDownloading { get; }
Property Value
IsSupportSubscriptions
Support any subscriptions (ticks, order books etc.).
public virtual bool IsSupportSubscriptions { get; }
Property Value
IsSupportTransactionLog
Adapter translates orders changes on reply of OrderStatusMessage.
public virtual bool IsSupportTransactionLog { get; }
Property Value
OwnInnerAdapter
Control InnerAdapter lifetime.
public bool OwnInnerAdapter { get; set; }
Property Value
Parent
Parental logs source.
public virtual ILogSource Parent { get; set; }
Property Value
PossibleSupportedMessages
Possible supported by adapter message types.
public virtual IEnumerable<MessageTypeInfo> PossibleSupportedMessages { get; }
Property Value
ReConnectionSettings
Connection tracking settings IMessageAdapter with a server.
public ReConnectionSettings ReConnectionSettings { get; }
Property Value
SendInBackFurther
Auto send BackMode messages to InnerAdapter.
protected virtual bool SendInBackFurther { get; }
Property Value
StorageName
The storage name, associated with the adapter.
public string StorageName { get; }
Property Value
SupportedInMessages
Supported by adapter message types.
public virtual IEnumerable<MessageTypes> SupportedInMessages { get; set; }
Property Value
SupportedMarketDataTypes
Supported by adapter market data types.
public virtual IEnumerable<DataType> SupportedMarketDataTypes { get; }
Property Value
SupportedOrderBookDepths
Available options for MaxDepth.
public virtual IEnumerable<int> SupportedOrderBookDepths { get; }
Property Value
SupportedResultMessages
Supported by adapter result message types.
public virtual IEnumerable<MessageTypes> SupportedResultMessages { get; }
Property Value
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
TypeThe type of the message CandleMessage.
securityId
SecurityIdSecurity 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
SecurityIddataType
DataTypeData type info.
iterationInterval
TimeSpanInterval between iterations.
Returns
- TimeSpan
Step.
GetMaxCount(DataType)
Get maximum possible items count per single subscription request.
public virtual int? GetMaxCount(DataType dataType)
Parameters
dataType
DataTypeData 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
Returns
- IEnumerable<DataType>
Supported data types.
InnerAdapterNewOutMessage(Message)
Process InnerAdapter output message.
protected virtual void InnerAdapterNewOutMessage(Message message)
Parameters
message
MessageThe message.
IsAllDownloadingSupported(DataType)
Is for the specified dataType
all securities downloading enabled.
public virtual bool IsAllDownloadingSupported(DataType dataType)
Parameters
dataType
DataTypeData type info.
Returns
- bool
Check result.
IsSecurityRequired(DataType)
Support filtering subscriptions (subscribe/unsubscribe for specified security).
public virtual bool IsSecurityRequired(DataType dataType)
Parameters
dataType
DataTypeData type info.
Returns
- bool
Check result.
IsSupportCandlesPriceLevels(MarketDataMessage)
Support candles PriceLevels.
public virtual bool IsSupportCandlesPriceLevels(MarketDataMessage subscription)
Parameters
subscription
MarketDataMessage
Returns
- bool
Check result.
IsSupportCandlesUpdates(MarketDataMessage)
Support candles subscription and live updates.
public virtual bool IsSupportCandlesUpdates(MarketDataMessage subscription)
Parameters
subscription
MarketDataMessage
Returns
- bool
Check result.
Load(SettingsStorage)
Load settings.
public virtual void Load(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.
OnInnerAdapterNewOutMessage(Message)
Process InnerAdapter output message.
protected virtual void OnInnerAdapterNewOutMessage(Message message)
Parameters
message
MessageThe message.
OnSendInMessage(Message)
Send message.
protected virtual bool OnSendInMessage(Message message)
Parameters
message
MessageMessage.
Returns
RaiseNewOutMessage(Message)
To call the event NewOutMessage.
protected void RaiseNewOutMessage(Message message)
Parameters
message
MessageThe message.
Save(SettingsStorage)
Save settings.
public virtual void Save(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.
SendInMessage(Message)
Send message.
public virtual bool SendInMessage(Message message)
Parameters
message
MessageMessage.
Returns
ToString()
public override string ToString()
Returns
Events
NewOutMessage
New message event.
public event Action<Message> NewOutMessage
Event Type
ParentRemoved
Parent removed.
public event Action<ILogSource> ParentRemoved