Lean
$LEAN_TAG$
|
Provides a base class for types holding instances keyed by Symbol More...
Public Member Functions | |
virtual void | Clear () |
Removes all items from the T:System.Collections.Generic.ICollection`1. More... | |
abstract bool | TryGetValue (Symbol symbol, out T value) |
Gets the value associated with the specified Symbol. More... | |
virtual bool | Remove (Symbol symbol) |
Removes the value with the specified Symbol More... | |
void | clear () |
Removes all keys and values from the IExtendedDictionary<TKey, TValue>. More... | |
PyDict | copy () |
Creates a shallow copy of the IExtendedDictionary<TKey, TValue>. More... | |
PyDict | fromkeys (Symbol[] sequence) |
Creates a new dictionary from the given sequence of elements. More... | |
PyDict | fromkeys (Symbol[] sequence, T value) |
Creates a new dictionary from the given sequence of elements with a value provided by the user. More... | |
T | get (Symbol symbol) |
Returns the value for the specified Symbol if Symbol is in dictionary. More... | |
T | get (Symbol symbol, T value) |
Returns the value for the specified Symbol if Symbol is in dictionary. More... | |
PyList | items () |
Returns a view object that displays a list of dictionary's (Symbol, value) tuple pairs. More... | |
PyTuple | popitem () |
Returns and removes an arbitrary element (Symbol, value) pair from the dictionary. More... | |
T | setdefault (Symbol symbol) |
Returns the value of a Symbol (if the Symbol is in dictionary). If not, it inserts Symbol with a value to the dictionary. More... | |
T | setdefault (Symbol symbol, T default_value) |
Returns the value of a Symbol (if the Symbol is in dictionary). If not, it inserts Symbol with a value to the dictionary. More... | |
T | pop (Symbol symbol) |
Removes and returns an element from a dictionary having the given Symbol. More... | |
T | pop (Symbol symbol, T default_value) |
Removes and returns an element from a dictionary having the given Symbol. More... | |
void | update (PyObject other) |
Updates the dictionary with the elements from the another dictionary object or from an iterable of Symbol/value pairs. The update() method adds element(s) to the dictionary if the Symbol is not in the dictionary.If the Symbol is in the dictionary, it updates the Symbol with the new value. More... | |
PyList | keys () |
Returns a view object that displays a list of all the Symbol objects in the dictionary More... | |
PyList | values () |
Returns a view object that displays a list of all the values in the dictionary. More... | |
Public Member Functions inherited from QuantConnect.Interfaces.IExtendedDictionary< Symbol, T > | |
void | clear () |
Removes all keys and values from the IExtendedDictionary<TKey, TValue>. More... | |
PyDict | copy () |
Creates a shallow copy of the IExtendedDictionary<TKey, TValue>. More... | |
PyDict | fromkeys (TKey[] sequence) |
Creates a new dictionary from the given sequence of elements. More... | |
PyDict | fromkeys (TKey[] sequence, TValue value) |
Creates a new dictionary from the given sequence of elements with a value provided by the user. More... | |
TValue | get (TKey key) |
Returns the value for the specified key if key is in dictionary. More... | |
TValue | get (TKey key, TValue value) |
Returns the value for the specified key if key is in dictionary. More... | |
PyList | items () |
Returns a view object that displays a list of dictionary's (key, value) tuple pairs. More... | |
PyList | keys () |
Returns a view object that displays a list of all the keys in the dictionary More... | |
PyTuple | popitem () |
Returns and removes an arbitrary element (key, value) pair from the dictionary. More... | |
TValue | setdefault (TKey key) |
Returns the value of a key (if the key is in dictionary). If not, it inserts key with a value to the dictionary. More... | |
TValue | setdefault (TKey key, TValue default_value) |
Returns the value of a key (if the key is in dictionary). If not, it inserts key with a value to the dictionary. More... | |
TValue | pop (TKey key) |
Removes and returns an element from a dictionary having the given key. More... | |
TValue | pop (TKey key, TValue default_value) |
Removes and returns an element from a dictionary having the given key. More... | |
void | update (PyObject other) |
Updates the dictionary with the elements from the another dictionary object or from an iterable of key/value pairs. The update() method adds element(s) to the dictionary if the key is not in the dictionary.If the key is in the dictionary, it updates the key with the new value. More... | |
PyList | values () |
Returns a view object that displays a list of all the values in the dictionary. More... | |
Public Attributes | |
virtual bool | IsReadOnly => true |
Gets a value indicating whether the IDictionary object is read-only. More... | |
Properties | |
abstract IEnumerable< Symbol > | GetKeys [get] |
Gets an T:System.Collections.Generic.ICollection`1 containing the Symbol objects of the T:System.Collections.Generic.IDictionary`2. More... | |
abstract IEnumerable< T > | GetValues [get] |
Gets an T:System.Collections.Generic.ICollection`1 containing the values in the T:System.Collections.Generic.IDictionary`2. More... | |
virtual T | this[Symbol symbol] [get, set] |
Indexer method for the base dictioanry to access the objects by their symbol. More... | |
virtual T | this[string ticker] [get, set] |
Indexer method for the base dictioanry to access the objects by their symbol. More... | |
Provides a base class for types holding instances keyed by Symbol
Definition at line 30 of file ExtendedDictionary.cs.
|
virtual |
Removes all items from the T:System.Collections.Generic.ICollection`1.
T:System.NotSupportedException | The T:System.Collections.Generic.ICollection`1 is read-only. |
Reimplemented in QuantConnect.Securities.SecurityPortfolioManager, QuantConnect.Securities.SecurityManager, and QuantConnect.Data.Market.DataDictionary< T >.
Definition at line 36 of file ExtendedDictionary.cs.
|
pure virtual |
Gets the value associated with the specified Symbol.
symbol | The Symbol whose value to get. |
value | When this method returns, the value associated with the specified Symbol, if the Symbol is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized. |
T:System.ArgumentNullException | symbol is null. |
Implemented in QuantConnect.Data.Market.DataDictionary< T >.
|
virtual |
Removes the value with the specified Symbol
symbol | The Symbol object of the element to remove. |
Reimplemented in QuantConnect.Securities.SecurityManager, QuantConnect.Securities.SecurityPortfolioManager, and QuantConnect.Data.Market.DataDictionary< T >.
Definition at line 81 of file ExtendedDictionary.cs.
void QuantConnect.ExtendedDictionary< T >.clear | ( | ) |
Removes all keys and values from the IExtendedDictionary<TKey, TValue>.
Definition at line 139 of file ExtendedDictionary.cs.
PyDict QuantConnect.ExtendedDictionary< T >.copy | ( | ) |
Creates a shallow copy of the IExtendedDictionary<TKey, TValue>.
Definition at line 148 of file ExtendedDictionary.cs.
PyDict QuantConnect.ExtendedDictionary< T >.fromkeys | ( | Symbol[] | sequence | ) |
Creates a new dictionary from the given sequence of elements.
sequence | Sequence of elements which is to be used as keys for the new dictionary |
Definition at line 158 of file ExtendedDictionary.cs.
PyDict QuantConnect.ExtendedDictionary< T >.fromkeys | ( | Symbol[] | sequence, |
T | value | ||
) |
Creates a new dictionary from the given sequence of elements with a value provided by the user.
sequence | Sequence of elements which is to be used as keys for the new dictionary |
value | Value which is set to each each element of the dictionary |
Definition at line 170 of file ExtendedDictionary.cs.
T QuantConnect.ExtendedDictionary< T >.get | ( | Symbol | symbol | ) |
Returns the value for the specified Symbol if Symbol is in dictionary.
symbol | Symbol to be searched in the dictionary |
Definition at line 190 of file ExtendedDictionary.cs.
T QuantConnect.ExtendedDictionary< T >.get | ( | Symbol | symbol, |
T | value | ||
) |
Returns the value for the specified Symbol if Symbol is in dictionary.
symbol | Symbol to be searched in the dictionary |
value | Value to be returned if the Symbol is not found. The default value is null. |
Definition at line 204 of file ExtendedDictionary.cs.
PyList QuantConnect.ExtendedDictionary< T >.items | ( | ) |
Returns a view object that displays a list of dictionary's (Symbol, value) tuple pairs.
Definition at line 218 of file ExtendedDictionary.cs.
PyTuple QuantConnect.ExtendedDictionary< T >.popitem | ( | ) |
Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.
Definition at line 246 of file ExtendedDictionary.cs.
T QuantConnect.ExtendedDictionary< T >.setdefault | ( | Symbol | symbol | ) |
Returns the value of a Symbol (if the Symbol is in dictionary). If not, it inserts Symbol with a value to the dictionary.
symbol | Key with null/None value is inserted to the dictionary if Symbol is not in the dictionary. |
Definition at line 257 of file ExtendedDictionary.cs.
T QuantConnect.ExtendedDictionary< T >.setdefault | ( | Symbol | symbol, |
T | default_value | ||
) |
Returns the value of a Symbol (if the Symbol is in dictionary). If not, it inserts Symbol with a value to the dictionary.
symbol | Key with a value default_value is inserted to the dictionary if Symbol is not in the dictionary. |
default_value | Default value |
Definition at line 269 of file ExtendedDictionary.cs.
T QuantConnect.ExtendedDictionary< T >.pop | ( | Symbol | symbol | ) |
Removes and returns an element from a dictionary having the given Symbol.
symbol | Key which is to be searched for removal |
Definition at line 292 of file ExtendedDictionary.cs.
T QuantConnect.ExtendedDictionary< T >.pop | ( | Symbol | symbol, |
T | default_value | ||
) |
Removes and returns an element from a dictionary having the given Symbol.
symbol | Key which is to be searched for removal |
default_value | Value which is to be returned when the Symbol is not in the dictionary |
Definition at line 304 of file ExtendedDictionary.cs.
void QuantConnect.ExtendedDictionary< T >.update | ( | PyObject | other | ) |
Updates the dictionary with the elements from the another dictionary object or from an iterable of Symbol/value pairs. The update() method adds element(s) to the dictionary if the Symbol is not in the dictionary.If the Symbol is in the dictionary, it updates the Symbol with the new value.
other | Takes either a dictionary or an iterable object of Symbol/value pairs (generally tuples). |
Definition at line 320 of file ExtendedDictionary.cs.
PyList QuantConnect.ExtendedDictionary< T >.keys | ( | ) |
Returns a view object that displays a list of all the Symbol objects in the dictionary
Definition at line 339 of file ExtendedDictionary.cs.
PyList QuantConnect.ExtendedDictionary< T >.values | ( | ) |
Returns a view object that displays a list of all the values in the dictionary.
Definition at line 348 of file ExtendedDictionary.cs.
virtual bool QuantConnect.ExtendedDictionary< T >.IsReadOnly => true |
Gets a value indicating whether the IDictionary object is read-only.
IDictionary implementation
Definition at line 74 of file ExtendedDictionary.cs.
|
getprotected |
Gets an T:System.Collections.Generic.ICollection`1 containing the Symbol objects of the T:System.Collections.Generic.IDictionary`2.
Definition at line 60 of file ExtendedDictionary.cs.
|
getprotected |
Gets an T:System.Collections.Generic.ICollection`1 containing the values in the T:System.Collections.Generic.IDictionary`2.
Definition at line 68 of file ExtendedDictionary.cs.
|
getset |
Indexer method for the base dictioanry to access the objects by their symbol.
IDictionary implementation
symbol | Symbol object indexer |
Definition at line 97 of file ExtendedDictionary.cs.
|
getset |
Indexer method for the base dictioanry to access the objects by their symbol.
IDictionary implementation
ticker | string ticker symbol indexer |
Definition at line 115 of file ExtendedDictionary.cs.