Table of Contents

Class InMemorySecurityMessageAdapterProvider

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

In memory implementation of ISecurityMessageAdapterProvider.

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

Constructors

InMemorySecurityMessageAdapterProvider()

Initializes a new instance of the InMemorySecurityMessageAdapterProvider.

public InMemorySecurityMessageAdapterProvider()

Properties

Adapters

All available adapters.

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

Property Value

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

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>