internal void ElseInternal(TronicSequence ElseBranch) { var LastBranch = Branches.Pop(); ElseBranch.GetFirst().FlowInFrom(LastBranch.Item1, LastBranch.Item2); }
public TronicSequence FlowOutTo(TronicSequence other, NodeType Out = NodeType.FlowOutA) { other.GetFirst().FlowInFrom(this.CurrentTronic, this.CurrentOut); return this; }
public TronicSequence IfNotEqual(DataNodeIn DataInA, DataNodeIn DataInB, string name = "IfNotEquals", TronicSequence Else = null) { CheckCanAppend(); FlowTronic NextTronic = tronics.IfEqual(name); NextTronic.DataInA(DataInA); NextTronic.DataInB(DataInB); if (Else != null) { NextTronic.FlowOutTo(Else.GetFirst(), NodeType.FlowOutA); this.tronics.CopyFromDestructive(Else.tronics); this.sequence.AddRange(Else.sequence); } Append(NextTronic, NextTronic.GetNode(NodeType.FlowOutB)); NoteBranch(NodeType.FlowOutA); return this; }
public TronicSequence Append(TronicSequence other) { if (this.CurrentTronic != null) { other.GetFirst().FlowInFrom(this.CurrentTronic, CurrentOut); } Tuple<FlowTronic, Node> temp = other.GetCurrent(); this.CurrentTronic = temp.Item1; this.CurrentOut = temp.Item2; this.sequence.AddRange(other.sequence); this.data.AddRange(other.data); this.tronics.CopyFromDestructive(other.tronics); return this; }