Table of Contents

Class CsvSecurityMappingStorage

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

CSV security identifier mappings storage.

public sealed class CsvSecurityMappingStorage : ISecurityMappingStorage
Inheritance
CsvSecurityMappingStorage
Implements
Inherited Members
Extension Methods

Constructors

CsvSecurityMappingStorage(string)

Initializes a new instance of the CsvSecurityMappingStorage.

public CsvSecurityMappingStorage(string path)

Parameters

path string

Path to storage.

Properties

DelayAction

The time delayed action.

public DelayAction DelayAction { get; set; }

Property Value

DelayAction

Methods

Get(string)

Get security identifier mappings for storage.

public IEnumerable<SecurityIdMapping> Get(string storageName)

Parameters

storageName string

Storage name.

Returns

IEnumerable<SecurityIdMapping>

Security identifiers mapping.

GetStorageNames()

Get storage names.

public IEnumerable<string> GetStorageNames()

Returns

IEnumerable<string>

Storage names.

Init()

Initialize the storage.

public IDictionary<string, Exception> Init()

Returns

IDictionary<string, Exception>

Possible errors with storage names. Empty dictionary means initialization without any issues.

Remove(string, SecurityId)

Remove security mapping.

public bool Remove(string storageName, SecurityId stockSharpId)

Parameters

storageName string

Storage name.

stockSharpId SecurityId

StockSharp format.

Returns

bool

true if mapping was added. Otherwise, false.

Save(string, SecurityIdMapping)

Save security identifier mapping.

public bool Save(string storageName, SecurityIdMapping mapping)

Parameters

storageName string

Storage name.

mapping SecurityIdMapping

Security identifier mapping.

Returns

bool

true if security mapping was added. If was changed, false.

TryGetAdapterId(string, SecurityId)

Try get AdapterId.

public SecurityId? TryGetAdapterId(string storageName, SecurityId stockSharpId)

Parameters

storageName string

Storage name.

stockSharpId SecurityId

StockSharp format.

Returns

SecurityId?

AdapterId if identifier exists. Otherwise, null.

TryGetStockSharpId(string, SecurityId)

Try get StockSharpId.

public SecurityId? TryGetStockSharpId(string storageName, SecurityId adapterId)

Parameters

storageName string

Storage name.

adapterId SecurityId

Adapter format.

Returns

SecurityId?

StockSharpId if identifier exists. Otherwise, null.

Events

Changed

The new native security identifier added to storage.

public event Action<string, SecurityIdMapping> Changed

Event Type

Action<string, SecurityIdMapping>