IntersectAsyncIterator<TSource, TKey, TResult>

Namespace: SnowBank.Linq.Async.Iterators · class

Implements: MergeAsyncIterator<TSource, TKey, TResult>, IAsyncLinqQuery<TResult>, IAsyncQuery<TResult>, IAsyncEnumerable<TResult>, IAsyncEnumerator<TResult>, IAsyncDisposable

Returns only the values for the keys that are in all the sub queries

Constructors

IntersectAsyncIterator<TSource, TKey, TResult>

IntersectAsyncIterator<TSource, TKey, TResult>(IEnumerable<IAsyncQuery<TSource>> sources, int? limit, Func<TSource, TKey> keySelector, Func<TSource, TResult> resultSelector, IComparer<TKey> comparer, CancellationToken ct)

Methods

Select

IAsyncLinqQuery<TNew> Select<TNew>(Func<TResult, TNew> selector)

Apply a transformation on the results of the intersection

Take

IAsyncLinqQuery<TResult> Take(int limit)

Limit the number of elements returned by the intersection

  • limit — Maximum number of results to return

Returns: New Intersect that will only return the specified number of results