MergeSortAsyncIterator<TSource, TKey, TResult>
Namespace: SnowBank.Linq.Async.Iterators · class
Implements: MergeAsyncIterator<TSource, TKey, TResult>, IAsyncLinqQuery<TResult>, IAsyncQuery<TResult>, IAsyncEnumerable<TResult>, IAsyncEnumerator<TResult>, IAsyncDisposable
Merge all the elements of several ordered queries into one single async sequence
Constructors
MergeSortAsyncIterator<TSource, TKey, TResult>
MergeSortAsyncIterator<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 merge sort
Take
IAsyncLinqQuery<TResult> Take(int limit)
Limit the number of elements returned by the MergeSort
limit— Maximum number of results to return
Returns: New MergeSort that will only return the specified number of results