public AbstractBTreeRangeIterator(BTreeRangeSingle range)
        {
            _range = range;
            BTreePointer first = range.First();

            if (first != null)
            {
                // we clone here, because we are calling unsafeNext() on BTreePointer
                // _cursor is our private copy, we modify it and never pass it out.
                _cursor = first.ShallowClone();
            }
        }
 public virtual bool MoveNext()
 {
     if (ReachedEnd())
     {
         _current = null;
         return(false);
     }
     if (_current == null)
     {
         _current = _cursor.ShallowClone();
     }
     else
     {
         _cursor.CopyTo(_current);
     }
     _cursor = _cursor.UnsafeFastNext();
     return(true);
 }