示例#1
0
 /// <summary>
 /// Move current item pointer to next item relative to the current item
 /// </summary>
 /// <returns></returns>
 public override bool MoveNext()
 {
     if (RootNode == null)
     {
         throw new InvalidOperationException("Can't MoveNext, ObjectStore is close.");
     }
     if (HintSequentialRead)
     {
         if (_sequentialReadBatchedIDs.Count == 0)
         {
             LoadSequentialReadBatchedIDs();
         }
         if (_sequentialReadIndex < _sequentialReadBatchedIDs.Count)
         {
             _sequentialReadIndex++;
         }
         if (_sequentialReadIndex == _sequentialReadBatchedIDs.Count)
         {
             LoadSequentialReadBatchedIDs();
         }
         return(_sequentialReadBatchedIDs.Count > 0);
     }
     if (CurrentItem != null)
     {
         BeginTreeMaintenance();
         try
         {
             BTreeNodeOnDisk o = CurrentItem.GetNode(this);
             if (
                 !(CurrentItem.NodeAddress == -1 || o.Slots == null || o.Slots[CurrentItem.NodeItemIndex] == null))
             {
                 return(o.MoveNext(this));
             }
         }
         finally
         {
             EndTreeMaintenance();
         }
     }
     return(false);
 }