Ejemplo n.º 1
0
 public bool MoveNext()
 {
     if (!_seekNeeded)
     {
         _pos++;
     }
     if (_pos >= _count)
     {
         return(false);
     }
     _keyValueTrProtector.Start();
     if (_keyValueTrProtector.WasInterupted(_prevProtectionCounter))
     {
         _relationInfo.CheckModifiedDuringEnum(_prevModificationCounter);
         _keyValueTr.SetKeyPrefix(_keyBytes);
         Seek();
     }
     else if (_seekNeeded)
     {
         Seek();
     }
     else
     {
         if (_ascending)
         {
             _keyValueTr.FindNextKey();
         }
         else
         {
             _keyValueTr.FindPreviousKey();
         }
     }
     _prevProtectionCounter = _keyValueTrProtector.ProtectionCounter;
     return(true);
 }
Ejemplo n.º 2
0
        public bool MoveNext()
        {
            if (!_seekNeeded)
            {
                _pos++;
            }
            _keyValueTrProtector.Start();
            if (_keyValueTrProtector.WasInterupted(_prevProtectionCounter))
            {
                RelationInfo.CheckModifiedDuringEnum(_prevModificationCounter);
                _keyValueTr.SetKeyPrefix(KeyBytes);
            }
            var ret = Seek();

            _prevProtectionCounter = _keyValueTrProtector.ProtectionCounter;
            return(ret);
        }