public Connection(Node fromNode, NodeOutput fromNodeOutput, Node toNode, NodeInput toNodeInput) { this.FromNode = fromNode; this.FromNodeOutput = fromNodeOutput; this.ToNode = toNode; this.ToNodeInput = toNodeInput; }
public ImmutableArray <Connection> GetAllConnectionsForNodeOutput(Node node, NodeOutput nodeOutput) { return(Connections.Where((c) => c.FromNode == node && c.FromNodeOutput == nodeOutput).ToImmutableArray()); }
public Node ReplaceOutput(NodeOutput oldNO, NodeOutput newNO) { var newOutputs = Outputs.Replace(oldNO, newNO); return(new Node(Name, Type, Position, Inputs, newOutputs)); }
public Int32 GetOutputIndex(NodeOutput output) { return(Outputs.IndexOf(output)); }