/// <summary> /// Execute query and return resultset as IEnumerable of T. If T is a ValueType or String, return values only (not documents) /// </summary> public Task <IEnumerable <T> > ToEnumerableAsync() { var tcs = new TaskCompletionSource <IEnumerable <T> >(); _liteDatabaseAsync.Enqueue(tcs, () => { tcs.SetResult(_wrappedQuery.ToEnumerable()); }); return(tcs.Task); }
public IEnumerator <T> GetEnumerator() { return(_queryable.ToEnumerable().GetEnumerator()); }
/// <summary> /// Execute query and return resultset as IEnumerable of T. If T is a ValueType or String, return values only (not documents) /// </summary> public Task <IEnumerable <T> > ToEnumerableAsync() { return(_liteDatabaseAsync.EnqueueAsync( () => _wrappedQuery.ToEnumerable())); }