Ejemplo n.º 1
0
        /// <summary>
        /// Returns true/false if query returns any result
        /// </summary>
        public Task <bool> ExistsAsync()
        {
            var tcs = new TaskCompletionSource <bool>();

            _liteDatabaseAsync.Enqueue(tcs, () => {
                tcs.SetResult(_wrappedQuery.Exists());
            });
            return(tcs.Task);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Returns true/false if query returns any result
 /// </summary>
 public Task <bool> ExistsAsync()
 {
     return(_liteDatabaseAsync.EnqueueAsync(
                () => _wrappedQuery.Exists()));
 }