예제 #1
0
 public override void PrepareForSearching()
 {
     if (Prefix == null && NewPrefix != null)
     {
         Prefix = new PrefixNode(new PrefixNodeHeader
         {
             PrefixLength = NewPrefix.KeyLength
         }, NewPrefix.Array, -1);
     }
 }
예제 #2
0
            bool IEnumerator.MoveNext()
            {
                if (currentParent != null)
                {
                    currentParent.ChildIndex++;
                }

                while (currentParent == null || currentParent.ChildIndex >= currentParent.Node.Children.Count)
                {
                    try
                    {
                        currentParent = parents.Pop();
                    }
                    catch (InvalidOperationException)
                    {
                        return(false);
                    }
                }

                return(true);
            }
예제 #3
0
 public void Visit(PrefixNode prefix)
 {
     prefix.Right.Parent = prefix;
     prefix.Right.Accept(this);
 }