Class VariableDependency<TInstruction>
Represents a collection of data sources for a single variable dependency of a node.
public class VariableDependency<TInstruction> : DataDependency<VariableDataSource<TInstruction>, TInstruction>, ISet<VariableDataSource<TInstruction>>, ICollection<VariableDataSource<TInstruction>>, IEnumerable<VariableDataSource<TInstruction>>, IEnumerable where TInstruction : notnull
Type Parameters
TInstructionThe type of instruction to put in a data flow node.
- Inheritance
-
DataDependency<VariableDataSource<TInstruction>, TInstruction>VariableDependency<TInstruction>
- Implements
-
ISet<VariableDataSource<TInstruction>>ICollection<VariableDataSource<TInstruction>>IEnumerable<VariableDataSource<TInstruction>>
- Inherited Members
Constructors
VariableDependency(IVariable)
Creates a new variable dependency.
public VariableDependency(IVariable variable)
Parameters
variableIVariableThe variable to depend on.
Properties
Variable
Gets the variable that is depended upon.
public IVariable Variable { get; }
Property Value
Methods
Add(DataFlowNode<TInstruction>)
Adds a data source to the dependency, referencing a variable value assigned by the provided node.
public VariableDataSource<TInstruction> Add(DataFlowNode<TInstruction> node)
Parameters
nodeDataFlowNode<TInstruction>The node assigning the value.
Returns
- VariableDataSource<TInstruction>
The variable data source.