Class DataDependency<TSource, TInstruction>
Provides a base for data dependencies of a node in a data flow graph, which is a set of one or more data flow nodes where the owner node might pull data from.
public abstract class DataDependency<TSource, TInstruction> : ISet<TSource>, ICollection<TSource>, IEnumerable<TSource>, IEnumerable where TSource : DataSource<TInstruction> where TInstruction : notnull
Type Parameters
TSourceThe type of data source that this dependency uses.
TInstructionThe type of contents to put in a data flow node.
- Inheritance
-
DataDependency<TSource, TInstruction>
- Implements
-
ISet<TSource>ICollection<TSource>IEnumerable<TSource>
- Derived
- Inherited Members
Properties
Count
public int Count { get; }
Property Value
Dependent
Gets the node that owns the dependency.
public DataFlowNode<TInstruction>? Dependent { get; }
Property Value
- DataFlowNode<TInstruction>
HasKnownDataSources
Gets a value indicating whether the data dependency has any known data sources.
public bool HasKnownDataSources { get; }
Property Value
IsReadOnly
public bool IsReadOnly { get; }
Property Value
Methods
Add(TSource)
public bool Add(TSource item)
Parameters
itemTSource
Returns
Clear()
public void Clear()
Contains(TSource)
public bool Contains(TSource item)
Parameters
itemTSource
Returns
CopyTo(TSource[], int)
public void CopyTo(TSource[] array, int arrayIndex)
Parameters
arrayTSource[]arrayIndexint
ExceptWith(IEnumerable<TSource>)
public void ExceptWith(IEnumerable<TSource> other)
Parameters
otherIEnumerable<TSource>
GetEdges()
Gets a collection of data flow edges that encode the stored data sources.
public IEnumerable<DataFlowEdge<TInstruction>> GetEdges()
Returns
- IEnumerable<DataFlowEdge<TInstruction>>
The edges.
GetEnumerator()
public IEnumerator<TSource> GetEnumerator()
Returns
- IEnumerator<TSource>
GetNodes()
Gets a collection of nodes that are possible data sources for the dependency.
public IEnumerable<DataFlowNode<TInstruction>> GetNodes()
Returns
- IEnumerable<DataFlowNode<TInstruction>>
IntersectWith(IEnumerable<TSource>)
public void IntersectWith(IEnumerable<TSource> other)
Parameters
otherIEnumerable<TSource>
IsProperSubsetOf(IEnumerable<TSource>)
public bool IsProperSubsetOf(IEnumerable<TSource> other)
Parameters
otherIEnumerable<TSource>
Returns
IsProperSupersetOf(IEnumerable<TSource>)
public bool IsProperSupersetOf(IEnumerable<TSource> other)
Parameters
otherIEnumerable<TSource>
Returns
IsSubsetOf(IEnumerable<TSource>)
public bool IsSubsetOf(IEnumerable<TSource> other)
Parameters
otherIEnumerable<TSource>
Returns
IsSupersetOf(IEnumerable<TSource>)
public bool IsSupersetOf(IEnumerable<TSource> other)
Parameters
otherIEnumerable<TSource>
Returns
Overlaps(IEnumerable<TSource>)
public bool Overlaps(IEnumerable<TSource> other)
Parameters
otherIEnumerable<TSource>
Returns
Remove(DataFlowNode<TInstruction>)
Removes all data sources that are incident with the provided node.
public bool Remove(DataFlowNode<TInstruction> node)
Parameters
nodeDataFlowNode<TInstruction>The node.
Returns
- bool
trueif at least one edge was removed,falseotherwise.
Remove(TSource)
public bool Remove(TSource item)
Parameters
itemTSource
Returns
SetEquals(IEnumerable<TSource>)
public bool SetEquals(IEnumerable<TSource> other)
Parameters
otherIEnumerable<TSource>
Returns
SymmetricExceptWith(IEnumerable<TSource>)
public void SymmetricExceptWith(IEnumerable<TSource> other)
Parameters
otherIEnumerable<TSource>
UnionWith(IEnumerable<TSource>)
public void UnionWith(IEnumerable<TSource> other)
Parameters
otherIEnumerable<TSource>