SecurityTrie
Security trie collection.
Implements: ICollection<Security>, IEnumerable<Security>, IEnumerable
Constructors
public SecurityTrie()
securityTrie = SecurityTrie()
Initializes a new instance of the SecurityTrie.
Properties
public int Count { get; }
value = securityTrie.Count
Gets the number of instruments contained in the SecurityTrie.
public bool IsReadOnly { get; }
value = securityTrie.IsReadOnly
Gets a value indicating whether the ICollection is read-only.
Returns: if the ICollection is read-only; otherwise, .
Methods
public void Add(Security security)
securityTrie.Add(security)
Add new instrument.
- security
- New instrument.
public bool Contains(Security item)
result = securityTrie.Contains(item)
Determines whether the ICollection contains a specific value.
- item
- The object to locate in the ICollection.
Returns: if is found in the ICollection; otherwise, .
public void CopyTo(Security[] array, int arrayIndex)
securityTrie.CopyTo(array, arrayIndex)
Copies the elements of the ICollection to an Array, starting at a particular Array index.
- array
- Destination array.
- arrayIndex
- Start index.
public Security GetById(SecurityId id)
result = securityTrie.GetById(id)
To get the instrument by the identifier.
- id
- Security ID.
Returns: The got instrument. If there is no instrument by given criteria, is returned.
public IEnumerator<Security> GetEnumerator()
result = securityTrie.GetEnumerator()
Returns an enumerator that iterates through the collection.
Returns: A IEnumerator that can be used to iterate through the collection.
public bool Remove(Security security)
result = securityTrie.Remove(security)
Remove the instrument.
- security
- The instrument.
Returns: if was successfully removed from the SecurityTrie; otherwise, .
public void RemoveRange(IEnumerable<Security> securities)
securityTrie.RemoveRange(securities)
Remove the instruments.
- securities
- The instruments.
public IEnumerable<Security> Retrieve(string filter)
result = securityTrie.Retrieve(filter)
Find all instrument by filter.
- filter
- Filter
Returns: Found instruments.
System#Collections#IEnumerable#GetEnumerator()
Returns an enumerator that iterates through a collection.
Returns: An IEnumerator object that can be used to iterate through the collection.