Example #1
0
 public Connection(Node fromNode,
                   NodeOutput fromNodeOutput,
                   Node toNode,
                   NodeInput toNodeInput)
 {
     this.FromNode       = fromNode;
     this.FromNodeOutput = fromNodeOutput;
     this.ToNode         = toNode;
     this.ToNodeInput    = toNodeInput;
 }
Example #2
0
 public ImmutableArray <Connection> GetAllConnectionsForNodeOutput(Node node, NodeOutput nodeOutput)
 {
     return(Connections.Where((c) => c.FromNode == node && c.FromNodeOutput == nodeOutput).ToImmutableArray());
 }
Example #3
0
        public Node ReplaceOutput(NodeOutput oldNO, NodeOutput newNO)
        {
            var newOutputs = Outputs.Replace(oldNO, newNO);

            return(new Node(Name, Type, Position, Inputs, newOutputs));
        }
Example #4
0
 public Int32 GetOutputIndex(NodeOutput output)
 {
     return(Outputs.IndexOf(output));
 }