GetInputChannels() public abstract method

public abstract GetInputChannels ( ) : IEnumerable
return IEnumerable
Esempio n. 1
0
 private static void BreakInputChannels(Node node)
 {
     foreach (var channel in node.GetInputChannels())
     {
         channel.IncomingConnection = null;
     }
 }
Esempio n. 2
0
        private IEnumerable <Node> GetConnectedNodesDepthFirstInner(Node parent, Stack <string> visitedNodes)
        {
            if (visitedNodes.Contains(parent.UniqueNodeIdentifier))
            {
                visitedNodes.Push(parent.UniqueNodeIdentifier);

                _lastException = new CircularReferenceException {
                    CircularTrace = visitedNodes, CausalNodeId = parent.UniqueNodeIdentifier
                };
                _depthSortedNodes = null;
                throw _lastException;
            }

            visitedNodes.Push(parent.UniqueNodeIdentifier);

            var toReturn = new List <Node> ();

            foreach (var input in parent.GetInputChannels())
            {
                if (input.IncomingConnection != null)
                {
                    toReturn.AddRange(GetConnectedNodesDepthFirstInner(GetNode(input.IncomingConnection.NodeIdentifier), visitedNodes));
                }
            }

            visitedNodes.Pop();

            toReturn.Add(parent);
            return(toReturn);
        }