src/Misc/EFTools/XmlCore/Model/Visitor/Visitor.cs
/// <summary>
///     Performs a breadth-first traversal across the metadata tree starting at "item".
///     The traversal calls Accept on each node.  Each node can override the Accept to
///     determine if they want to allow the Visitor to visit.  Their Accept method should
///     return the child nodes to be processed next.
/// </summary>
/// <param name="item"></param>
Performs a breadth-first traversal across the metadata tree starting at "item".
The traversal calls Accept on each node.  Each node can override the Accept to
determine if they want to allow the Visitor to visit.  Their Accept method should
return the child nodes to be processed next.
Performs a breadth - first traversal across the metadata tree starting at " item " . The traversal calls Accept on each node . Each node can override the Accept to determine if they want to allow the Visitor to visit . Their Accept method should return the child nodes to be processed next .
internal void Traverse(IVisitable visitable)
        {
            var toVisit = new Queue<IVisitable>();
            toVisit.Enqueue(visitable);
            while (toVisit.Count > 0)
            {
                var i = toVisit.Dequeue();
                var newNodes = i.Accept(this);
                if (newNodes != null)
                {
                    foreach (var v in newNodes)
                    {
                        toVisit.Enqueue(v);
                    }
                }
            }
        }
internal void Traverse ( IVisitable visitable ) { var toVisit = new Queue < IVisitable > ( ) ; toVisit . Enqueue ( visitable ) ; while ( toVisit . Count > 0 ) { var i = toVisit . Dequeue ( ) ; var newNodes = i . Accept ( this ) ; if ( newNodes != null ) { foreach ( var v in newNodes ) { toVisit . Enqueue ( v ) ; } } } }
Performs a breadth-first traversal across the metadata tree starting at "item".
Performs a breadth - first traversal across the metadata tree starting at " item " .
// do a BFS across the metadata graph starting from item.
visitable
IVisitable
item
None