Table of Contents

Interface INativeIdStorage

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

Security native identifier storage.

public interface INativeIdStorage
Extension Methods

Methods

Clear(string)

Clear storage.

void Clear(string storageName)

Parameters

storageName string

Storage name.

Get(string)

Get native security identifiers for storage.

(SecurityId secId, object nativeId)[] Get(string storageName)

Parameters

storageName string

Storage name.

Returns

(SecurityId secId, object nativeId)[]

Security identifiers.

Init()

Initialize the storage.

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.

bool RemoveByNativeId(string storageName, object nativeId, bool isPersistable = true)

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.

bool RemoveBySecurityId(string storageName, SecurityId securityId, bool isPersistable = true)

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.

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

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.

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.

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.

event Action<string, SecurityId, object> Added

Event Type

Action<string, SecurityId, object>