2using System.Collections;
3using System.Threading.Tasks;
12 internal class ReversedCursor<T> : ICursor<T>
14 private readonly ICursor<T> cursor;
20 internal ReversedCursor(ICursor<T> Cursor)
34 return this.cursor.Current;
45 return this.cursor.CurrentSerializer;
53 public bool CurrentTypeCompatible
57 return this.cursor.CurrentTypeCompatible;
66 public Guid CurrentObjectId
70 return this.cursor.CurrentObjectId;
95 object IEnumerator.Current => this.Current;
104 public bool MoveNext() => this.MoveNextAsyncLocked().Result;
109 public void Reset() => this.cursor.Reset();
117 public Task<bool> MoveNextAsyncLocked()
119 return this.cursor.MovePreviousAsyncLocked();
128 public Task<bool> MovePreviousAsyncLocked()
130 return this.cursor.MoveNextAsyncLocked();
140 public bool SameSortOrder(
string[] ConstantFields,
string[] SortOrder)
142 return this.cursor.ReverseSortOrder(ConstantFields, SortOrder);
152 public bool ReverseSortOrder(
string[] ConstantFields,
string[] SortOrder)
154 return this.cursor.SameSortOrder(ConstantFields, SortOrder);
161 public Task ContinueAfterLocked(T LastItem)
163 return this.cursor.ContinueBeforeLocked(LastItem);
170 public Task ContinueBeforeLocked(T LastItem)
172 return this.cursor.ContinueAfterLocked(LastItem);
Interface for asynchronous enumerators.
Task< bool > MoveNextAsync()
Advances the enumerator to the next element of the collection.
Interface for object serializers.