Table of Contents

Class InMemorySecurityStorage

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

In memory implementation of ISecurityStorage.

public class InMemorySecurityStorage : ISecurityStorage, ISecurityProvider, ISecurityMessageProvider
Inheritance
InMemorySecurityStorage
Implements
Inherited Members
Extension Methods

Constructors

InMemorySecurityStorage()

Initializes a new instance of the InMemorySecurityStorage.

public InMemorySecurityStorage()

InMemorySecurityStorage(ISecurityProvider)

Initializes a new instance of the InMemorySecurityStorage.

public InMemorySecurityStorage(ISecurityProvider underlying)

Parameters

underlying ISecurityProvider

Underlying provider.

Methods

Delete(Security)

Delete security.

public void Delete(Security security)

Parameters

security Security

Security.

DeleteBy(SecurityLookupMessage)

To delete instruments by the criterion.

public void DeleteBy(SecurityLookupMessage criteria)

Parameters

criteria SecurityLookupMessage

The criterion.

DeleteRange(IEnumerable<Security>)

Delete securities.

public void DeleteRange(IEnumerable<Security> securities)

Parameters

securities IEnumerable<Security>

Securities.

Lookup(SecurityLookupMessage)

Lookup securities by criteria criteria.

public IEnumerable<Security> Lookup(SecurityLookupMessage criteria)

Parameters

criteria SecurityLookupMessage

Message security lookup for specified criteria.

Returns

IEnumerable<Security>

Found instruments.

LookupById(SecurityId)

To get the instrument by the identifier.

public Security LookupById(SecurityId id)

Parameters

id SecurityId

Security ID.

Returns

Security

The got instrument. If there is no instrument by given criteria, null is returned.

Save(Security, bool)

Save security.

public void Save(Security security, bool forced)

Parameters

security Security

Security.

forced bool

Forced update.

Events

Added

New instruments added.

public event Action<IEnumerable<Security>> Added

Event Type

Action<IEnumerable<Security>>

Cleared

The storage was cleared.

public event Action Cleared

Event Type

Action

Removed

Instruments removed.

public event Action<IEnumerable<Security>> Removed

Event Type

Action<IEnumerable<Security>>