예제 #1
0
 public bool MoveNext()
 {
     if (this._seq._version != this._version)
     {
         throw new InvalidOperationException(EMDataStructures.EnumFailedVersion);
     }
     if (this._page == null)
     {
         return(false);
     }
     this._index++;
     if (this._page.Next != null)
     {
         if (this._index >= 8)
         {
             this._page  = this._page.Next;
             this._index = 0;
         }
     }
     else if (this._index >= this._seq._lastPageItemCount)
     {
         this._page = null;
         return(false);
     }
     this._current = this._page.Items[this._index];
     return(true);
 }
예제 #2
0
 public void Reset()
 {
     this._index   = -1;
     this._page    = this._seq._first;
     this._version = this._seq._version;
     this._current = default(T);
 }
예제 #3
0
 internal Enumerator(PagedSequence <T> seq)
 {
     this._seq     = seq;
     this._index   = -1;
     this._page    = this._seq._first;
     this._version = this._seq._version;
     this._current = default(T);
 }