Exemplo n.º 1
0
        /// <summary>
        /// Returns first document of resultset
        /// </summary>
        public Task <T> FirstAsync()
        {
            var tcs = new TaskCompletionSource <T>();

            _liteDatabaseAsync.Enqueue(tcs, () => {
                tcs.SetResult(_wrappedQuery.First());
            });
            return(tcs.Task);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Returns first document of resultset
 /// </summary>
 public Task <T> FirstAsync()
 {
     return(_liteDatabaseAsync.EnqueueAsync(
                () => _wrappedQuery.First()));
 }