INativeIdStorage

StockSharp.Algo.Storages

Single storage for security native identifiers.

Methods

ClearAsync
public ValueTask ClearAsync(CancellationToken cancellationToken)
result = iNativeIdStorage.ClearAsync(cancellationToken)

Clear storage.

cancellationToken
CancellationToken
GetAsync
public ValueTask<ValueTuple<SecurityId, object>[]> GetAsync(CancellationToken cancellationToken)
result = iNativeIdStorage.GetAsync(cancellationToken)

Get all native security identifiers.

cancellationToken
CancellationToken

Returns: Security identifiers.

RemoveByNativeIdAsync
public ValueTask<bool> RemoveByNativeIdAsync(object nativeId, bool isPersistable, CancellationToken cancellationToken)
result = iNativeIdStorage.RemoveByNativeIdAsync(nativeId, isPersistable, cancellationToken)

Remove by native identifier.

nativeId
Native (internal) trading system security id.
isPersistable
Save the identifier as a permanent.
cancellationToken
CancellationToken

Returns: Operation result.

RemoveBySecurityIdAsync
public ValueTask<bool> RemoveBySecurityIdAsync(SecurityId securityId, bool isPersistable, CancellationToken cancellationToken)
result = iNativeIdStorage.RemoveBySecurityIdAsync(securityId, isPersistable, cancellationToken)

Remove by security identifier.

securityId
Security identifier.
isPersistable
Save the identifier as a permanent.
cancellationToken
CancellationToken

Returns: Operation result.

TryAddAsync
public ValueTask<bool> TryAddAsync(SecurityId securityId, object nativeId, bool isPersistable, CancellationToken cancellationToken)
result = iNativeIdStorage.TryAddAsync(securityId, nativeId, isPersistable, cancellationToken)

Try add native security identifier.

securityId
Security identifier.
nativeId
Native (internal) trading system security id.
isPersistable
Save the identifier as a permanent.
cancellationToken
CancellationToken

Returns: if native identifier was added. Otherwise, .

TryGetByNativeIdAsync
public ValueTask<SecurityId?> TryGetByNativeIdAsync(object nativeId, CancellationToken cancellationToken)
result = iNativeIdStorage.TryGetByNativeIdAsync(nativeId, cancellationToken)

Try get security identifier by native identifier.

nativeId
Native (internal) trading system security id.
cancellationToken
CancellationToken

Returns: Security identifier.

TryGetBySecurityIdAsync
public ValueTask<object> TryGetBySecurityIdAsync(SecurityId securityId, CancellationToken cancellationToken)
result = iNativeIdStorage.TryGetBySecurityIdAsync(securityId, cancellationToken)

Try get native security identifier by identifier.

securityId
Security identifier.
cancellationToken
CancellationToken

Returns: Native (internal) trading system security id.

Events

Added
public event Func<SecurityId, object, CancellationToken, ValueTask> Added
iNativeIdStorage.Added += handler

The new native security identifier added to storage.