Lean  $LEAN_TAG$
QuantConnect.Securities.DynamicSecurityData Class Reference

Provides access to a security's data via it's type. This implementation supports dynamic access by type name. More...

Inheritance diagram for QuantConnect.Securities.DynamicSecurityData:
[legend]

Public Member Functions

 DynamicSecurityData (IRegisteredSecurityDataTypesProvider registeredTypes, SecurityCache cache)
 Initializes a new instance of the DynamicSecurityData class More...
 
DynamicMetaObject GetMetaObject (Expression parameter)
 Returns the T:System.Dynamic.DynamicMetaObject responsible for binding operations performed on this object. More...
 
bool HasData< T > ()
 Gets whether or not this dynamic data instance has data stored for the specified type More...
 
bool HasProperty (string name)
 Gets whether or not this dynamic data instance has a property with the specified name. This is a case-insensitive search. More...
 
Get< T > ()
 Gets the last item in the data list for the specified type More...
 
IReadOnlyList< T > GetAll< T > ()
 Gets the data list for the specified type More...
 
PyObject Get (Type type)
 Get the matching cached object in a python friendly accessor More...
 
IList GetAll (Type type)
 Get all the matching types with a python friendly overload. More...
 
object SetProperty (string name, object value)
 Sets the property with the specified name to the value. This is a case-insensitve search. More...
 
object GetProperty (string name)
 Gets the property's value with the specified name. This is a case-insensitve search. More...
 

Detailed Description

Provides access to a security's data via it's type. This implementation supports dynamic access by type name.

Definition at line 33 of file DynamicSecurityData.cs.

Constructor & Destructor Documentation

◆ DynamicSecurityData()

QuantConnect.Securities.DynamicSecurityData.DynamicSecurityData ( IRegisteredSecurityDataTypesProvider  registeredTypes,
SecurityCache  cache 
)

Initializes a new instance of the DynamicSecurityData class

Parameters
registeredTypesProvides all the registered data types for the algorithm
cacheThe security cache

Definition at line 47 of file DynamicSecurityData.cs.

Member Function Documentation

◆ GetMetaObject()

DynamicMetaObject QuantConnect.Securities.DynamicSecurityData.GetMetaObject ( Expression  parameter)

Returns the T:System.Dynamic.DynamicMetaObject responsible for binding operations performed on this object.

Returns
The T:System.Dynamic.DynamicMetaObject to bind this object.
Parameters
parameterThe expression tree representation of the runtime value.

Definition at line 56 of file DynamicSecurityData.cs.

◆ HasData< T >()

bool QuantConnect.Securities.DynamicSecurityData.HasData< T > ( )

Gets whether or not this dynamic data instance has data stored for the specified type

Definition at line 64 of file DynamicSecurityData.cs.

◆ HasProperty()

bool QuantConnect.Securities.DynamicSecurityData.HasProperty ( string  name)

Gets whether or not this dynamic data instance has a property with the specified name. This is a case-insensitive search.

Parameters
nameThe property name to check for
Returns
True if the property exists, false otherwise

Definition at line 75 of file DynamicSecurityData.cs.

◆ Get< T >()

Gets the last item in the data list for the specified type

Definition at line 88 of file DynamicSecurityData.cs.

Here is the call graph for this function:

◆ GetAll< T >()

Gets the data list for the specified type

Definition at line 97 of file DynamicSecurityData.cs.

Here is the caller graph for this function:

◆ Get()

PyObject QuantConnect.Securities.DynamicSecurityData.Get ( Type  type)

Get the matching cached object in a python friendly accessor

Parameters
typeType to search for
Returns
Matching object

Definition at line 107 of file DynamicSecurityData.cs.

Here is the call graph for this function:

◆ GetAll()

IList QuantConnect.Securities.DynamicSecurityData.GetAll ( Type  type)

Get all the matching types with a python friendly overload.

Parameters
typeSearch type
Returns
List of matching objects cached

Definition at line 127 of file DynamicSecurityData.cs.

Here is the caller graph for this function:

◆ SetProperty()

object QuantConnect.Securities.DynamicSecurityData.SetProperty ( string  name,
object  value 
)

Sets the property with the specified name to the value. This is a case-insensitve search.

Parameters
nameThe property name to set
valueThe new property value
Returns
Returns the input value back to the caller

Definition at line 139 of file DynamicSecurityData.cs.

◆ GetProperty()

object QuantConnect.Securities.DynamicSecurityData.GetProperty ( string  name)

Gets the property's value with the specified name. This is a case-insensitve search.

Parameters
nameThe property name to access
Returns
object value of BaseData

Definition at line 149 of file DynamicSecurityData.cs.


The documentation for this class was generated from the following file: