Lean  $LEAN_TAG$
QuantConnect.Parameters.ParameterAttribute Class Reference

Specifies a field or property is a parameter that can be set from an AlgorithmNodePacket.Parameters dictionary More...

Inheritance diagram for QuantConnect.Parameters.ParameterAttribute:
[legend]

Public Member Functions

 ParameterAttribute (string name=null)
 Initializes a new instance of the ParameterAttribute class More...
 

Static Public Member Functions

static void ApplyAttributes (Dictionary< string, string > parameters, object instance)
 Uses reflections to inspect the instance for any parameter attributes. If a value is found in the parameters dictionary, it is set. More...
 
static Dictionary< string, string > GetParametersFromAssembly (Assembly assembly)
 Resolves all parameter attributes from the specified compiled assembly path More...
 
static IEnumerable< KeyValuePair< string, string > > GetParametersFromType (Type type)
 Resolves all parameter attributes from the specified type More...
 

Static Public Attributes

const BindingFlags BindingFlags = System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Instance
 Specifies the binding flags used by this implementation to resolve parameter attributes More...
 

Properties

string Name [get]
 Gets the name of this parameter More...
 

Detailed Description

Specifies a field or property is a parameter that can be set from an AlgorithmNodePacket.Parameters dictionary

Definition at line 30 of file ParameterAttribute.cs.

Constructor & Destructor Documentation

◆ ParameterAttribute()

QuantConnect.Parameters.ParameterAttribute.ParameterAttribute ( string  name = null)

Initializes a new instance of the ParameterAttribute class

Parameters
nameThe name of the parameter. If null is specified then the field or property name will be used

Definition at line 47 of file ParameterAttribute.cs.

Member Function Documentation

◆ ApplyAttributes()

static void QuantConnect.Parameters.ParameterAttribute.ApplyAttributes ( Dictionary< string, string >  parameters,
object  instance 
)
static

Uses reflections to inspect the instance for any parameter attributes. If a value is found in the parameters dictionary, it is set.

Parameters
parametersThe parameters dictionary
instanceThe instance to set parameters on

Definition at line 58 of file ParameterAttribute.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetParametersFromAssembly()

static Dictionary<string, string> QuantConnect.Parameters.ParameterAttribute.GetParametersFromAssembly ( Assembly  assembly)
static

Resolves all parameter attributes from the specified compiled assembly path

Parameters
assemblyThe assembly to inspect
Returns
Parameters dictionary keyed by parameter name with a value of the member type

Definition at line 124 of file ParameterAttribute.cs.

Here is the call graph for this function:

◆ GetParametersFromType()

static IEnumerable<KeyValuePair<string, string> > QuantConnect.Parameters.ParameterAttribute.GetParametersFromType ( Type  type)
static

Resolves all parameter attributes from the specified type

Parameters
typeThe type to inspect
Returns
Parameters dictionary keyed by parameter name with a value of the member type

Definition at line 142 of file ParameterAttribute.cs.

Here is the caller graph for this function:

Member Data Documentation

◆ BindingFlags

const BindingFlags QuantConnect.Parameters.ParameterAttribute.BindingFlags = System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Instance
static

Specifies the binding flags used by this implementation to resolve parameter attributes

Definition at line 35 of file ParameterAttribute.cs.

Property Documentation

◆ Name

string QuantConnect.Parameters.ParameterAttribute.Name
get

Gets the name of this parameter

Definition at line 40 of file ParameterAttribute.cs.


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