Table of Contents

Class CsvNativeIdStorage

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

CSV security native identifier storage.

public sealed class CsvNativeIdStorage : INativeIdStorage
Inheritance
CsvNativeIdStorage
Implements
Inherited Members
Extension Methods

Constructors

CsvNativeIdStorage(string)

Initializes a new instance of the CsvNativeIdStorage.

public CsvNativeIdStorage(string path)

Parameters

path string

Path to storage.

Properties

DelayAction

The time delayed action.

public DelayAction DelayAction { get; set; }

Property Value

DelayAction

Methods

Clear(string)

Clear storage.

public void Clear(string storageName)

Parameters

storageName string

Storage name.

Get(string)

Get native security identifiers for storage.

public (SecurityId, object)[] Get(string storageName)

Parameters

storageName string

Storage name.

Returns

(SecurityId secId, object nativeId)[]

Security identifiers.

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.

RemoveByNativeId(string, object, bool)

Remove by native identifier.

public bool RemoveByNativeId(string storageName, object nativeId, bool isPersistable)

Parameters

storageName string

Storage name.

nativeId object

Native (internal) trading system security id.

isPersistable bool

Save the identifier as a permanent.

Returns

bool

Operation result.

RemoveBySecurityId(string, SecurityId, bool)

Remove by security identifier.

public bool RemoveBySecurityId(string storageName, SecurityId securityId, bool isPersistable)

Parameters

storageName string

Storage name.

securityId SecurityId

Security identifier.

isPersistable bool

Save the identifier as a permanent.

Returns

bool

Operation result.

TryAdd(string, SecurityId, object, bool)

Try add native security identifier to storage.

public bool TryAdd(string storageName, SecurityId securityId, object nativeId, bool isPersistable)

Parameters

storageName string

Storage name.

securityId SecurityId

Security identifier.

nativeId object

Native (internal) trading system security id.

isPersistable bool

Save the identifier as a permanent.

Returns

bool

true if native identifier was added. Otherwise, false.

TryGetByNativeId(string, object)

Try get security identifier by native identifier.

public SecurityId? TryGetByNativeId(string storageName, object nativeId)

Parameters

storageName string

Storage name.

nativeId object

Native (internal) trading system security id.

Returns

SecurityId?

Security identifier.

TryGetBySecurityId(string, SecurityId)

Try get native security identifier by identifier.

public object TryGetBySecurityId(string storageName, SecurityId securityId)

Parameters

storageName string

Storage name.

securityId SecurityId

Security identifier.

Returns

object

Native (internal) trading system security id.

Events

Added

The new native security identifier added to storage.

public event Action<string, SecurityId, object> Added

Event Type

Action<string, SecurityId, object>