Lean
$LEAN_TAG$
|
Base class for Python wrapper classes More...
Public Member Functions | |
BasePythonWrapper (bool validateInterface=true) | |
Creates a new instance of the BasePythonWrapper<TInterface> class More... | |
BasePythonWrapper (PyObject instance, bool validateInterface=true) | |
Creates a new instance of the BasePythonWrapper<TInterface> class with the specified instance More... | |
void | SetPythonInstance (PyObject instance) |
Sets the python instance More... | |
T | GetProperty< T > (string propertyName) |
Gets the Python instance property with the specified name More... | |
PyObject | GetProperty (string propertyName) |
Gets the Python instance property with the specified name More... | |
void | SetProperty (string propertyName, object value) |
Sets the Python instance property with the specified name More... | |
dynamic | GetEvent (string name) |
Gets the Python instance event with the specified name More... | |
bool | HasAttr (string name) |
Determines whether the Python instance has the specified attribute More... | |
PyObject | GetMethod (string methodName) |
Gets the Python instances method with the specified name and caches it More... | |
T | InvokeMethod< T > (string methodName, params object[] args) |
Invokes the specified method with the specified arguments More... | |
PyObject | InvokeMethod (string methodName, params object[] args) |
Invokes the specified method with the specified arguments More... | |
Protected Attributes | |
PyObject | Instance => _instance |
Gets the underlying python instance More... | |
Base class for Python wrapper classes
Definition at line 24 of file BasePythonWrapper.cs.
QuantConnect.Python.BasePythonWrapper< TInterface >.BasePythonWrapper | ( | bool | validateInterface = true | ) |
Creates a new instance of the BasePythonWrapper<TInterface> class
validateInterface | Whether to perform validations for interface implementation |
Definition at line 42 of file BasePythonWrapper.cs.
QuantConnect.Python.BasePythonWrapper< TInterface >.BasePythonWrapper | ( | PyObject | instance, |
bool | validateInterface = true |
||
) |
Creates a new instance of the BasePythonWrapper<TInterface> class with the specified instance
instance | The underlying python instance |
validateInterface | Whether to perform validations for interface implementation |
Definition at line 54 of file BasePythonWrapper.cs.
void QuantConnect.Python.BasePythonWrapper< TInterface >.SetPythonInstance | ( | PyObject | instance | ) |
Sets the python instance
instance | The underlying python instance |
Definition at line 64 of file BasePythonWrapper.cs.
T QuantConnect.Python.BasePythonWrapper< TInterface >.GetProperty< T > | ( | string | propertyName | ) |
Gets the Python instance property with the specified name
propertyName | The name of the property |
Definition at line 80 of file BasePythonWrapper.cs.
PyObject QuantConnect.Python.BasePythonWrapper< TInterface >.GetProperty | ( | string | propertyName | ) |
Gets the Python instance property with the specified name
propertyName | The name of the property |
Definition at line 90 of file BasePythonWrapper.cs.
void QuantConnect.Python.BasePythonWrapper< TInterface >.SetProperty | ( | string | propertyName, |
object | value | ||
) |
Sets the Python instance property with the specified name
propertyName | The name of the property |
value | The property value |
Definition at line 101 of file BasePythonWrapper.cs.
dynamic QuantConnect.Python.BasePythonWrapper< TInterface >.GetEvent | ( | string | name | ) |
Gets the Python instance event with the specified name
name | The name of the event |
Definition at line 111 of file BasePythonWrapper.cs.
bool QuantConnect.Python.BasePythonWrapper< TInterface >.HasAttr | ( | string | name | ) |
Determines whether the Python instance has the specified attribute
name | The attribute name |
Definition at line 122 of file BasePythonWrapper.cs.
PyObject QuantConnect.Python.BasePythonWrapper< TInterface >.GetMethod | ( | string | methodName | ) |
Gets the Python instances method with the specified name and caches it
methodName | The name of the method |
Definition at line 133 of file BasePythonWrapper.cs.
T QuantConnect.Python.BasePythonWrapper< TInterface >.InvokeMethod< T > | ( | string | methodName, |
params object[] | args | ||
) |
Invokes the specified method with the specified arguments
methodName | The name of the method |
args | The arguments to call the method with |
Definition at line 150 of file BasePythonWrapper.cs.
PyObject QuantConnect.Python.BasePythonWrapper< TInterface >.InvokeMethod | ( | string | methodName, |
params object[] | args | ||
) |
Invokes the specified method with the specified arguments
methodName | The name of the method |
args | The arguments to call the method with |
Definition at line 162 of file BasePythonWrapper.cs.
|
protected |
Gets the underlying python instance
Definition at line 36 of file BasePythonWrapper.cs.