public override FdbAsyncIterator <TSource> Where(Func <TSource, CancellationToken, Task <bool> > asyncPredicate)
 {
     return(FdbAsyncEnumerable.Filter <TSource>(
                m_source,
                m_filter.AndAlso(new AsyncFilterExpression <TSource>(asyncPredicate))
                ));
 }
 public override FdbAsyncIterator <TSource> Where(Func <TSource, bool> predicate)
 {
     return(FdbAsyncEnumerable.Filter <TSource>(
                m_source,
                m_filter.AndAlso(new AsyncFilterExpression <TSource>(predicate))
                ));
 }
Ejemplo n.º 3
0
        public virtual FdbAsyncIterator <TNew> SelectMany <TNew>([NotNull] Func <TResult, CancellationToken, Task <IEnumerable <TNew> > > asyncSelector)
        {
            if (asyncSelector == null)
            {
                throw new ArgumentNullException("asyncSelector");
            }

            return(FdbAsyncEnumerable.Flatten <TResult, TNew>(this, new AsyncTransformExpression <TResult, IEnumerable <TNew> >(asyncSelector)));
        }
Ejemplo n.º 4
0
        public virtual FdbAsyncIterator <TNew> Select <TNew>([NotNull] Func <TResult, TNew> selector)
        {
            if (selector == null)
            {
                throw new ArgumentNullException("selector");
            }

            return(FdbAsyncEnumerable.Map <TResult, TNew>(this, new AsyncTransformExpression <TResult, TNew>(selector)));
        }
Ejemplo n.º 5
0
        public virtual FdbAsyncIterator <TResult> Where([NotNull] Func <TResult, CancellationToken, Task <bool> > asyncPredicate)
        {
            if (asyncPredicate == null)
            {
                throw new ArgumentNullException("asyncPredicate");
            }

            return(FdbAsyncEnumerable.Filter <TResult>(this, new AsyncFilterExpression <TResult>(asyncPredicate)));
        }
Ejemplo n.º 6
0
        public virtual FdbAsyncIterator <TResult> Where([NotNull] Func <TResult, bool> predicate)
        {
            if (predicate == null)
            {
                throw new ArgumentNullException("predicate");
            }

            return(FdbAsyncEnumerable.Filter <TResult>(this, new AsyncFilterExpression <TResult>(predicate)));
        }
Ejemplo n.º 7
0
        public virtual FdbAsyncIterator <TNew> SelectMany <TCollection, TNew>([NotNull] Func <TResult, IEnumerable <TCollection> > collectionSelector, [NotNull] Func <TResult, TCollection, TNew> resultSelector)
        {
            if (collectionSelector == null)
            {
                throw new ArgumentNullException("collectionSelector");
            }
            if (resultSelector == null)
            {
                throw new ArgumentNullException("resultSelector");
            }

            return(FdbAsyncEnumerable.Flatten <TResult, TCollection, TNew>(this, new AsyncTransformExpression <TResult, IEnumerable <TCollection> >(collectionSelector), resultSelector));
        }
Ejemplo n.º 8
0
 public virtual Task ExecuteAsync([NotNull] Func <TResult, CancellationToken, Task> asyncAction, CancellationToken ct)
 {
     return(FdbAsyncEnumerable.Run <TResult>(this, FdbAsyncMode.All, asyncAction, ct));
 }
Ejemplo n.º 9
0
 public virtual FdbAsyncIterator <TResult> Skip(int count)
 {
     return(FdbAsyncEnumerable.Offset <TResult>(this, count));
 }
Ejemplo n.º 10
0
 public virtual FdbAsyncIterator <TResult> TakeWhile([NotNull] Func <TResult, bool> condition)
 {
     return(FdbAsyncEnumerable.Limit <TResult>(this, condition));
 }
Ejemplo n.º 11
0
 public virtual FdbAsyncIterator <TResult> Take(int count)
 {
     return(FdbAsyncEnumerable.Limit <TResult>(this, count));
 }