System.Text.RegularExpressions.RegexNode.Dump C# (CSharp) Method

Dump() private method

private Dump ( ) : void
return void
        internal void Dump()
        {
            List<int> Stack = new List<int>();
            RegexNode CurNode;
            int CurChild;

            CurNode = this;
            CurChild = 0;

            Debug.WriteLine(CurNode.Description());

            for (; ;)
            {
                if (CurNode._children != null && CurChild < CurNode._children.Count)
                {
                    Stack.Add(CurChild + 1);
                    CurNode = CurNode._children[CurChild];
                    CurChild = 0;

                    int Depth = Stack.Count;
                    if (Depth > 32)
                        Depth = 32;

                    Debug.WriteLine(Space.Substring(0, Depth) + CurNode.Description());
                }
                else
                {
                    if (Stack.Count == 0)
                        break;

                    CurChild = Stack[Stack.Count - 1];
                    Stack.RemoveAt(Stack.Count - 1);
                    CurNode = CurNode._next;
                }
            }
        }

Usage Example

Esempio n. 1
0
 internal void Dump()
 {
     _root.Dump();
 }
All Usage Examples Of System.Text.RegularExpressions.RegexNode::Dump