Table of Contents

Class CsvSecurityMessageAdapterProvider

Namespace
StockSharp.Algo.Storages
Assembly
StockSharp.Algo.dll

CSV implementation of ISecurityMessageAdapterProvider.

public class CsvSecurityMessageAdapterProvider : ISecurityMessageAdapterProvider, IMappingMessageAdapterProvider<Tuple<SecurityId, DataType>>
Inheritance
CsvSecurityMessageAdapterProvider
Implements
Inherited Members
Extension Methods

Constructors

CsvSecurityMessageAdapterProvider(string)

Initializes a new instance of the CsvSecurityMessageAdapterProvider.

public CsvSecurityMessageAdapterProvider(string fileName)

Parameters

fileName string

File name.

Properties

Adapters

All available adapters.

public IEnumerable<KeyValuePair<Tuple<SecurityId, DataType>, Guid>> Adapters { get; }

Property Value

IEnumerable<KeyValuePair<Tuple<SecurityId, DataType>, Guid>>

DelayAction

The time delayed action.

public DelayAction DelayAction { get; set; }

Property Value

DelayAction

Methods

Init()

Initialize the storage.

public void Init()

RemoveAssociation(Tuple<SecurityId, DataType>)

Remove association with adapter.

public bool RemoveAssociation(Tuple<SecurityId, DataType> key)

Parameters

key Tuple<SecurityId, DataType>

Key.

Returns

bool

true if the association is successfully removed, otherwise, false.

SetAdapter(SecurityId, DataType, Guid)

Make association with adapter.

public bool SetAdapter(SecurityId securityId, DataType dataType, Guid adapterId)

Parameters

securityId SecurityId

Security ID.

dataType DataType

Data type.

adapterId Guid

Adapter identifier.

Returns

bool

true if the association is successfully changed, otherwise, false.

SetAdapter(Tuple<SecurityId, DataType>, Guid)

Make association with adapter.

public bool SetAdapter(Tuple<SecurityId, DataType> key, Guid adapterId)

Parameters

key Tuple<SecurityId, DataType>

Key.

adapterId Guid

Adapter identifier.

Returns

bool

true if the association is successfully changed, otherwise, false.

TryGetAdapter(SecurityId, DataType)

Get adapter by the specified security id.

public Guid? TryGetAdapter(SecurityId securityId, DataType dataType)

Parameters

securityId SecurityId

Security ID.

dataType DataType

Data type.

Returns

Guid?

Found adapter identifier or null.

TryGetAdapter(Tuple<SecurityId, DataType>)

Get adapter by the specified key.

public Guid? TryGetAdapter(Tuple<SecurityId, DataType> key)

Parameters

key Tuple<SecurityId, DataType>

Key.

Returns

Guid?

Found adapter identifier or null.

Events

Changed

Association changed.

public event Action<Tuple<SecurityId, DataType>, Guid, bool> Changed

Event Type

Action<Tuple<SecurityId, DataType>, Guid, bool>