Esempio n. 1
0
        public static IReadOnlyList <Node> GetAllNodes(Node node)
        {
            var visitor = new PostOrderVisitor();

            node.AcceptVisitor(visitor);
            return(visitor._nodes.ToArray());
        }
Esempio n. 2
0
 /// <summary>
 ///     Visits all the nodes.
 /// </summary>
 /// <param name="node">Input node.</param>
 /// <returns>Returns the list of visited nodes.</returns>
 public static IReadOnlyList <Node> AllNodes(Node node)
 {
     return(PostOrderVisitor.GetAllNodes(node));
 }