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
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
securitySecurityNew 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
itemSecurityThe object to locate in the ICollection<T>.
Returns
- bool
true if
itemis 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
GetById(SecurityId)
To get the instrument by the identifier.
public Security GetById(SecurityId id)
Parameters
idSecurityIdSecurity ID.
Returns
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
securitySecurityThe instrument.
Returns
- bool
true if
securitywas successfully removed from the SecurityTrie; otherwise, false.
RemoveRange(IEnumerable<Security>)
Remove the instruments.
public void RemoveRange(IEnumerable<Security> securities)
Parameters
securitiesIEnumerable<Security>The instruments.
Retrieve(string)
Find all instrument by filter.
public IEnumerable<Security> Retrieve(string filter)
Parameters
filterstringFilter
Returns
- IEnumerable<Security>
Found instruments.