Exemplo n.º 1
0
 public void Close()
 {
     lock (this.mtx)
     {
         this.state    = (long)IterationState.iteratorClosed;
         this.callback = nilIterationCallback;
         this.tree     = null;
     }
 }
Exemplo n.º 2
0
        // NewRbIterator creates a new iterator for the given RbTree
        public RbIterator NewRbIterator(RbIterationCallback callback, out error err)
        {
            err = null;
            if (callback == null)
            {
                err = ErrorDef.ArgumentNilError("callback");
                return(null);
            }

            return(new rbIterationContext {
                tree = this,
                callback = callback,
                state = (long)IterationState.iteratorReady,
            });
        }