Table of Contents

Class CollectionSecurityProvider

Namespace
StockSharp.Algo
Assembly
StockSharp.Algo.dll

The supplier of information on instruments, getting data from the collection.

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

Constructors

CollectionSecurityProvider()

Initializes a new instance of the CollectionSecurityProvider.

public CollectionSecurityProvider()

CollectionSecurityProvider(IEnumerable<Security>)

Initializes a new instance of the CollectionSecurityProvider.

public CollectionSecurityProvider(IEnumerable<Security> securities)

Parameters

securities IEnumerable<Security>

The instruments collection.

Properties

Count

Gets the number of instruments contained in the ISecurityProvider.

public int Count { get; }

Property Value

int

Methods

Add(Security)

Add security.

public void Add(Security security)

Parameters

security Security

Security.

AddRange(IEnumerable<Security>)

Add securities.

public void AddRange(IEnumerable<Security> securities)

Parameters

securities IEnumerable<Security>

Securities.

Clear()

Clear.

public void Clear()

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.

Remove(Security)

Remove security.

public bool Remove(Security security)

Parameters

security Security

Security.

Returns

bool

Check result.

RemoveRange(IEnumerable<Security>)

Remove securities.

public void RemoveRange(IEnumerable<Security> securities)

Parameters

securities IEnumerable<Security>

Securities.