Beispiel #1
0
        private static async Task AssertCannotAccessRecords(IResultCursor cursor)
        {
            await ThrowsResultConsumedException(async() => await cursor.FetchAsync());
            await ThrowsResultConsumedException(async() => await cursor.PeekAsync());

            ThrowsResultConsumedException(() => cursor.Current);
            await ThrowsResultConsumedException(async() => await cursor.SingleAsync());
            await ThrowsResultConsumedException(async() => await cursor.ToListAsync());
            await ThrowsResultConsumedException(async() => await cursor.ForEachAsync(r => { }));
        }
Beispiel #2
0
 public IRecord Peek()
 {
     return(_executor.RunSync(() => _cursor.PeekAsync()));
 }