Table of Contents

Class SecurityTrie

Namespace
StockSharp.Algo
Assembly
StockSharp.Algo.dll

Security trie collection.

public class SecurityTrie : ICollection<Security>, IEnumerable<Security>, IEnumerable
Inheritance
SecurityTrie
Implements
Inherited Members
Extension Methods

Constructors

SecurityTrie()

Initializes a new instance of the SecurityTrie.

public SecurityTrie()

Properties

Count

Gets the number of instruments contained in the SecurityTrie.

public int Count { get; }

Property Value

int

IsReadOnly

Gets a value indicating whether the ICollection<T> is read-only.

public bool IsReadOnly { get; }

Property Value

bool

true if the ICollection<T> is read-only; otherwise, false.

Methods

Add(Security)

Add new instrument.

public void Add(Security security)

Parameters

security Security

New instrument.

Clear()

Remove all instruments.

public virtual void Clear()

Contains(Security)

Determines whether the ICollection<T> contains a specific value.

public bool Contains(Security item)

Parameters

item Security

The object to locate in the ICollection<T>.

Returns

bool

true if item is found in the ICollection<T>; otherwise, false.

CopyTo(Security[], int)

Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.

public void CopyTo(Security[] array, int arrayIndex)

Parameters

array Security[]

Destination array.

arrayIndex int

Start index.

GetById(SecurityId)

To get the instrument by the identifier.

public Security GetById(SecurityId id)

Parameters

id SecurityId

Security ID.

Returns

Security

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

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<Security> GetEnumerator()

Returns

IEnumerator<Security>

A IEnumerator<T> that can be used to iterate through the collection.

Remove(Security)

Remove the instrument.

public bool Remove(Security security)

Parameters

security Security

The instrument.

Returns

bool

true if security was successfully removed from the SecurityTrie; otherwise, false.

RemoveRange(IEnumerable<Security>)

Remove the instruments.

public void RemoveRange(IEnumerable<Security> securities)

Parameters

securities IEnumerable<Security>

The instruments.

Retrieve(string)

Find all instrument by filter.

public IEnumerable<Security> Retrieve(string filter)

Parameters

filter string

Filter

Returns

IEnumerable<Security>

Found instruments.