diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncEnumerable.AsyncOverloads.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncEnumerable.AsyncOverloads.cs index 59f03c4c65..b2e93bdf52 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncEnumerable.AsyncOverloads.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncEnumerable.AsyncOverloads.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information. -#if SUPPORT_FLAT_ASYNC_API - using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; @@ -12,206 +10,406 @@ namespace System.Linq { partial class AsyncEnumerable { - public static ValueTask AggregateAsync(this IAsyncEnumerable source, Func> accumulator, CancellationToken cancellationToken) => AggregateAwaitAsync(source, accumulator, cancellationToken); - public static ValueTask AggregateAsync(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, CancellationToken cancellationToken) => AggregateAwaitAsync(source, seed, accumulator, cancellationToken); - public static ValueTask AggregateAsync(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, Func> resultSelector, CancellationToken cancellationToken) => AggregateAwaitAsync(source, seed, accumulator, resultSelector, cancellationToken); - public static ValueTask AllAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => AllAwaitAsync(source, predicate, cancellationToken); - public static ValueTask AnyAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => AnyAwaitAsync(source, predicate, cancellationToken); - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsync(source, selector, cancellationToken); - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsync(source, selector, cancellationToken); - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsync(source, selector, cancellationToken); - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsync(source, selector, cancellationToken); - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsync(source, selector, cancellationToken); - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsync(source, selector, cancellationToken); - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsync(source, selector, cancellationToken); - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsync(source, selector, cancellationToken); - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsync(source, selector, cancellationToken); - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsync(source, selector, cancellationToken); - public static ValueTask CountAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => CountAwaitAsync(source, predicate, cancellationToken); - public static ValueTask FirstAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => FirstAwaitAsync(source, predicate, cancellationToken); - public static ValueTask FirstOrDefaultAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => FirstOrDefaultAwaitAsync(source, predicate, cancellationToken); - public static Task ForEachAsync(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken) => ForEachAwaitAsync(source, action, cancellationToken); - public static Task ForEachAsync(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken) => ForEachAwaitAsync(source, action, cancellationToken); - public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func> keySelector) => GroupByAwait(source, keySelector); - public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer) => GroupByAwait(source, keySelector, comparer); - public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector) => GroupByAwait(source, keySelector, elementSelector); - public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func> keySelector, Func, ValueTask> resultSelector) => GroupByAwait(source, keySelector, resultSelector); - public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, ValueTask> resultSelector) => GroupByAwait(source, keySelector, elementSelector, resultSelector); - public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer) => GroupByAwait(source, keySelector, elementSelector, comparer); - public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func> keySelector, Func, ValueTask> resultSelector, IEqualityComparer comparer) => GroupByAwait(source, keySelector, resultSelector, comparer); - public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, ValueTask> resultSelector, IEqualityComparer comparer) => GroupByAwait(source, keySelector, elementSelector, resultSelector, comparer); - public static IAsyncEnumerable GroupJoin(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, ValueTask> resultSelector) => GroupJoinAwait(outer, inner, outerKeySelector, innerKeySelector, resultSelector); - public static IAsyncEnumerable GroupJoin(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, ValueTask> resultSelector, IEqualityComparer comparer) => GroupJoinAwait(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer); - public static IAsyncEnumerable Join(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector) => JoinAwait(outer, inner, outerKeySelector, innerKeySelector, resultSelector); - public static IAsyncEnumerable Join(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector, IEqualityComparer comparer) => JoinAwait(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer); - public static ValueTask LastAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => LastAwaitAsync(source, predicate, cancellationToken); - public static ValueTask LastOrDefaultAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => LastOrDefaultAwaitAsync(source, predicate, cancellationToken); - public static ValueTask LongCountAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => LongCountAwaitAsync(source, predicate, cancellationToken); - public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsync(source, selector, cancellationToken); - public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsync(source, selector, cancellationToken); - public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsync(source, selector, cancellationToken); - public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsync(source, selector, cancellationToken); - public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsync(source, selector, cancellationToken); - public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsync(source, selector, cancellationToken); - public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsync(source, selector, cancellationToken); - public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsync(source, selector, cancellationToken); - public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsync(source, selector, cancellationToken); - public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsync(source, selector, cancellationToken); - public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsync(source, selector, cancellationToken); - public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsync(source, selector, cancellationToken); - public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsync(source, selector, cancellationToken); - public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsync(source, selector, cancellationToken); - public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsync(source, selector, cancellationToken); - public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsync(source, selector, cancellationToken); - public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsync(source, selector, cancellationToken); - public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsync(source, selector, cancellationToken); - public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsync(source, selector, cancellationToken); - public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsync(source, selector, cancellationToken); - public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsync(source, selector, cancellationToken); - public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsync(source, selector, cancellationToken); - public static IOrderedAsyncEnumerable OrderBy(this IAsyncEnumerable source, Func> keySelector) => OrderByAwait(source, keySelector); - public static IOrderedAsyncEnumerable OrderBy(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => OrderByAwait(source, keySelector, comparer); - public static IOrderedAsyncEnumerable OrderByDescending(this IAsyncEnumerable source, Func> keySelector) => OrderByDescendingAwait(source, keySelector); - public static IOrderedAsyncEnumerable OrderByDescending(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => OrderByDescendingAwait(source, keySelector, comparer); - public static IAsyncEnumerable Select(this IAsyncEnumerable source, Func> selector) => SelectAwait(source, selector); - public static IAsyncEnumerable Select(this IAsyncEnumerable source, Func> selector) => SelectAwait(source, selector); - public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, Func>> selector) => SelectManyAwait(source, selector); - public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, Func>> selector) => SelectManyAwait(source, selector); - public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) => SelectManyAwait(source, collectionSelector, resultSelector); - public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) => SelectManyAwait(source, collectionSelector, resultSelector); - public static ValueTask SingleAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => SingleAwaitAsync(source, predicate, cancellationToken); - public static ValueTask SingleOrDefaultAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => SingleOrDefaultAwaitAsync(source, predicate, cancellationToken); - public static IAsyncEnumerable SkipWhile(this IAsyncEnumerable source, Func> predicate) => SkipWhileAwait(source, predicate); - public static IAsyncEnumerable SkipWhile(this IAsyncEnumerable source, Func> predicate) => SkipWhileAwait(source, predicate); - public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsync(source, selector, cancellationToken); - public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsync(source, selector, cancellationToken); - public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsync(source, selector, cancellationToken); - public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsync(source, selector, cancellationToken); - public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsync(source, selector, cancellationToken); - public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsync(source, selector, cancellationToken); - public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsync(source, selector, cancellationToken); - public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsync(source, selector, cancellationToken); - public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsync(source, selector, cancellationToken); - public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsync(source, selector, cancellationToken); - public static IAsyncEnumerable TakeWhile(this IAsyncEnumerable source, Func> predicate) => TakeWhileAwait(source, predicate); - public static IAsyncEnumerable TakeWhile(this IAsyncEnumerable source, Func> predicate) => TakeWhileAwait(source, predicate); - public static IOrderedAsyncEnumerable ThenBy(this IOrderedAsyncEnumerable source, Func> keySelector) => ThenByAwait(source, keySelector); - public static IOrderedAsyncEnumerable ThenBy(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) => ThenByAwait(source, keySelector, comparer); - public static IOrderedAsyncEnumerable ThenByDescending(this IOrderedAsyncEnumerable source, Func> keySelector) => ThenByDescendingAwait(source, keySelector); - public static IOrderedAsyncEnumerable ThenByDescending(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) => ThenByDescendingAwait(source, keySelector, comparer); - public static ValueTask> ToDictionaryAsync(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken) => ToDictionaryAwaitAsync(source, keySelector, cancellationToken); - public static ValueTask> ToDictionaryAsync(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) => ToDictionaryAwaitAsync(source, keySelector, comparer, cancellationToken); - public static ValueTask> ToDictionaryAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken) => ToDictionaryAwaitAsync(source, keySelector, elementSelector, cancellationToken); - public static ValueTask> ToDictionaryAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken) => ToDictionaryAwaitAsync(source, keySelector, elementSelector, comparer, cancellationToken); - public static ValueTask> ToLookupAsync(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken) => ToLookupAwaitAsync(source, keySelector, cancellationToken); - public static ValueTask> ToLookupAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken) => ToLookupAwaitAsync(source, keySelector, elementSelector, cancellationToken); - public static ValueTask> ToLookupAsync(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) => ToLookupAwaitAsync(source, keySelector, comparer, cancellationToken); - public static ValueTask> ToLookupAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken) => ToLookupAwaitAsync(source, keySelector, elementSelector, comparer, cancellationToken); - public static IAsyncEnumerable Where(this IAsyncEnumerable source, Func> predicate) => WhereAwait(source, predicate); - public static IAsyncEnumerable Where(this IAsyncEnumerable source, Func> predicate) => WhereAwait(source, predicate); - public static IAsyncEnumerable Zip(this IAsyncEnumerable first, IAsyncEnumerable second, Func> selector) => ZipAwait(first, second, selector); +#if SUPPORT_FLAT_ASYNC_API + public static ValueTask AggregateAsync(this IAsyncEnumerable source, Func> accumulator, CancellationToken cancellationToken) => AggregateAwaitAsyncCore(source, accumulator, cancellationToken); + public static ValueTask AggregateAsync(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, CancellationToken cancellationToken) => AggregateAwaitAsyncCore(source, seed, accumulator, cancellationToken); + public static ValueTask AggregateAsync(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, Func> resultSelector, CancellationToken cancellationToken) => AggregateAwaitAsyncCore(source, seed, accumulator, resultSelector, cancellationToken); + public static ValueTask AllAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => AllAwaitAsyncCore(source, predicate, cancellationToken); + public static ValueTask AnyAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => AnyAwaitAsyncCore(source, predicate, cancellationToken); + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask CountAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => CountAwaitAsyncCore(source, predicate, cancellationToken); + public static ValueTask FirstAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => FirstAwaitAsyncCore(source, predicate, cancellationToken); + public static ValueTask FirstOrDefaultAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => FirstOrDefaultAwaitAsyncCore(source, predicate, cancellationToken); + public static Task ForEachAsync(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken) => ForEachAwaitAsyncCore(source, action, cancellationToken); + public static Task ForEachAsync(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken) => ForEachAwaitAsyncCore(source, action, cancellationToken); + public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func> keySelector) => GroupByAwaitCore(source, keySelector); + public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func> keySelector, Func, ValueTask> resultSelector) => GroupByAwaitCore(source, keySelector, resultSelector); + public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer) => GroupByAwaitCore(source, keySelector, comparer); + public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector) => GroupByAwaitCore(source, keySelector, elementSelector); + public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func> keySelector, Func, ValueTask> resultSelector, IEqualityComparer comparer) => GroupByAwaitCore(source, keySelector, resultSelector, comparer); + public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, ValueTask> resultSelector) => GroupByAwaitCore(source, keySelector, elementSelector, resultSelector); + public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer) => GroupByAwaitCore(source, keySelector, elementSelector, comparer); + public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, ValueTask> resultSelector, IEqualityComparer comparer) => GroupByAwaitCore(source, keySelector, elementSelector, resultSelector, comparer); + public static IAsyncEnumerable GroupJoin(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, ValueTask> resultSelector) => GroupJoinAwaitCore(outer, inner, outerKeySelector, innerKeySelector, resultSelector); + public static IAsyncEnumerable GroupJoin(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, ValueTask> resultSelector, IEqualityComparer comparer) => GroupJoinAwaitCore(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer); + public static IAsyncEnumerable Join(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector) => JoinAwaitCore(outer, inner, outerKeySelector, innerKeySelector, resultSelector); + public static IAsyncEnumerable Join(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector, IEqualityComparer comparer) => JoinAwaitCore(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer); + public static ValueTask LastAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => LastAwaitAsyncCore(source, predicate, cancellationToken); + public static ValueTask LastOrDefaultAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => LastOrDefaultAwaitAsyncCore(source, predicate, cancellationToken); + public static ValueTask LongCountAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => LongCountAwaitAsyncCore(source, predicate, cancellationToken); + public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsyncCore(source, selector, cancellationToken); + public static IOrderedAsyncEnumerable OrderBy(this IAsyncEnumerable source, Func> keySelector) => OrderByAwaitCore(source, keySelector); + public static IOrderedAsyncEnumerable OrderBy(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => OrderByAwaitCore(source, keySelector, comparer); + public static IOrderedAsyncEnumerable OrderByDescending(this IAsyncEnumerable source, Func> keySelector) => OrderByDescendingAwaitCore(source, keySelector); + public static IOrderedAsyncEnumerable OrderByDescending(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => OrderByDescendingAwaitCore(source, keySelector, comparer); + public static IAsyncEnumerable Select(this IAsyncEnumerable source, Func> selector) => SelectAwaitCore(source, selector); + public static IAsyncEnumerable Select(this IAsyncEnumerable source, Func> selector) => SelectAwaitCore(source, selector); + public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, Func>> selector) => SelectManyAwaitCore(source, selector); + public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, Func>> selector) => SelectManyAwaitCore(source, selector); + public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) => SelectManyAwaitCore(source, collectionSelector, resultSelector); + public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) => SelectManyAwaitCore(source, collectionSelector, resultSelector); + public static ValueTask SingleAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => SingleAwaitAsyncCore(source, predicate, cancellationToken); + public static ValueTask SingleOrDefaultAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => SingleOrDefaultAwaitAsyncCore(source, predicate, cancellationToken); + public static IAsyncEnumerable SkipWhile(this IAsyncEnumerable source, Func> predicate) => SkipWhileAwaitCore(source, predicate); + public static IAsyncEnumerable SkipWhile(this IAsyncEnumerable source, Func> predicate) => SkipWhileAwaitCore(source, predicate); + public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsyncCore(source, selector, cancellationToken); + public static IAsyncEnumerable TakeWhile(this IAsyncEnumerable source, Func> predicate) => TakeWhileAwaitCore(source, predicate); + public static IAsyncEnumerable TakeWhile(this IAsyncEnumerable source, Func> predicate) => TakeWhileAwaitCore(source, predicate); + public static IOrderedAsyncEnumerable ThenBy(this IOrderedAsyncEnumerable source, Func> keySelector) => ThenByAwaitCore(source, keySelector); + public static IOrderedAsyncEnumerable ThenBy(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) => ThenByAwaitCore(source, keySelector, comparer); + public static IOrderedAsyncEnumerable ThenByDescending(this IOrderedAsyncEnumerable source, Func> keySelector) => ThenByDescendingAwaitCore(source, keySelector); + public static IOrderedAsyncEnumerable ThenByDescending(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) => ThenByDescendingAwaitCore(source, keySelector, comparer); + public static ValueTask> ToDictionaryAsync(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken) => ToDictionaryAwaitAsyncCore(source, keySelector, cancellationToken); + public static ValueTask> ToDictionaryAsync(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) => ToDictionaryAwaitAsyncCore(source, keySelector, comparer, cancellationToken); + public static ValueTask> ToDictionaryAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken) => ToDictionaryAwaitAsyncCore(source, keySelector, elementSelector, cancellationToken); + public static ValueTask> ToDictionaryAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken) => ToDictionaryAwaitAsyncCore(source, keySelector, elementSelector, comparer, cancellationToken); + public static ValueTask> ToLookupAsync(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken) => ToLookupAwaitAsyncCore(source, keySelector, cancellationToken); + public static ValueTask> ToLookupAsync(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) => ToLookupAwaitAsyncCore(source, keySelector, comparer, cancellationToken); + public static ValueTask> ToLookupAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken) => ToLookupAwaitAsyncCore(source, keySelector, elementSelector, cancellationToken); + public static ValueTask> ToLookupAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken) => ToLookupAwaitAsyncCore(source, keySelector, elementSelector, comparer, cancellationToken); + public static IAsyncEnumerable Where(this IAsyncEnumerable source, Func> predicate) => WhereAwaitCore(source, predicate); + public static IAsyncEnumerable Where(this IAsyncEnumerable source, Func> predicate) => WhereAwaitCore(source, predicate); + public static IAsyncEnumerable Zip(this IAsyncEnumerable first, IAsyncEnumerable second, Func> selector) => ZipAwaitCore(first, second, selector); #if !NO_DEEP_CANCELLATION - public static ValueTask AggregateAsync(this IAsyncEnumerable source, Func> accumulator, CancellationToken cancellationToken) => AggregateAwaitWithCancellationAsync(source, accumulator, cancellationToken); - public static ValueTask AggregateAsync(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, CancellationToken cancellationToken) => AggregateAwaitWithCancellationAsync(source, seed, accumulator, cancellationToken); - public static ValueTask AggregateAsync(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, Func> resultSelector, CancellationToken cancellationToken) => AggregateAwaitWithCancellationAsync(source, seed, accumulator, resultSelector, cancellationToken); - public static ValueTask AllAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => AllAwaitWithCancellationAsync(source, predicate, cancellationToken); - public static ValueTask AnyAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => AnyAwaitWithCancellationAsync(source, predicate, cancellationToken); - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask CountAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => CountAwaitWithCancellationAsync(source, predicate, cancellationToken); - public static ValueTask FirstAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => FirstAwaitWithCancellationAsync(source, predicate, cancellationToken); - public static ValueTask FirstOrDefaultAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => FirstOrDefaultAwaitWithCancellationAsync(source, predicate, cancellationToken); - public static Task ForEachAsync(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken) => ForEachAwaitWithCancellationAsync(source, action, cancellationToken); - public static Task ForEachAsync(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken) => ForEachAwaitWithCancellationAsync(source, action, cancellationToken); - public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func> keySelector) => GroupByAwaitWithCancellation(source, keySelector); - public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer) => GroupByAwaitWithCancellation(source, keySelector, comparer); - public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector) => GroupByAwaitWithCancellation(source, keySelector, elementSelector); - public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func> keySelector, Func, CancellationToken, ValueTask> resultSelector) => GroupByAwaitWithCancellation(source, keySelector, resultSelector); - public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, CancellationToken, ValueTask> resultSelector) => GroupByAwaitWithCancellation(source, keySelector, elementSelector, resultSelector); - public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer) => GroupByAwaitWithCancellation(source, keySelector, elementSelector, comparer); - public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func> keySelector, Func, CancellationToken, ValueTask> resultSelector, IEqualityComparer comparer) => GroupByAwaitWithCancellation(source, keySelector, resultSelector, comparer); - public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, CancellationToken, ValueTask> resultSelector, IEqualityComparer comparer) => GroupByAwaitWithCancellation(source, keySelector, elementSelector, resultSelector, comparer); - public static IAsyncEnumerable GroupJoin(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, CancellationToken, ValueTask> resultSelector) => GroupJoinAwaitWithCancellation(outer, inner, outerKeySelector, innerKeySelector, resultSelector); - public static IAsyncEnumerable GroupJoin(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, CancellationToken, ValueTask> resultSelector, IEqualityComparer comparer) => GroupJoinAwaitWithCancellation(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer); - public static IAsyncEnumerable Join(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector) => JoinAwaitWithCancellation(outer, inner, outerKeySelector, innerKeySelector, resultSelector); - public static IAsyncEnumerable Join(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector, IEqualityComparer comparer) => JoinAwaitWithCancellation(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer); - public static ValueTask LastAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => LastAwaitWithCancellationAsync(source, predicate, cancellationToken); - public static ValueTask LastOrDefaultAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => LastOrDefaultAwaitWithCancellationAsync(source, predicate, cancellationToken); - public static ValueTask LongCountAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => LongCountAwaitWithCancellationAsync(source, predicate, cancellationToken); - public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsync(source, selector, cancellationToken); - public static IOrderedAsyncEnumerable OrderBy(this IAsyncEnumerable source, Func> keySelector) => OrderByAwaitWithCancellation(source, keySelector); - public static IOrderedAsyncEnumerable OrderBy(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => OrderByAwaitWithCancellation(source, keySelector, comparer); - public static IOrderedAsyncEnumerable OrderByDescending(this IAsyncEnumerable source, Func> keySelector) => OrderByDescendingAwaitWithCancellation(source, keySelector); - public static IOrderedAsyncEnumerable OrderByDescending(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => OrderByDescendingAwaitWithCancellation(source, keySelector, comparer); - public static IAsyncEnumerable Select(this IAsyncEnumerable source, Func> selector) => SelectAwaitWithCancellation(source, selector); - public static IAsyncEnumerable Select(this IAsyncEnumerable source, Func> selector) => SelectAwaitWithCancellation(source, selector); - public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, Func>> selector) => SelectManyAwaitWithCancellation(source, selector); - public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, Func>> selector) => SelectManyAwaitWithCancellation(source, selector); - public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) => SelectManyAwaitWithCancellation(source, collectionSelector, resultSelector); - public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) => SelectManyAwaitWithCancellation(source, collectionSelector, resultSelector); - public static ValueTask SingleAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => SingleAwaitWithCancellationAsync(source, predicate, cancellationToken); - public static ValueTask SingleOrDefaultAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => SingleOrDefaultAwaitWithCancellationAsync(source, predicate, cancellationToken); - public static IAsyncEnumerable SkipWhile(this IAsyncEnumerable source, Func> predicate) => SkipWhileAwaitWithCancellation(source, predicate); - public static IAsyncEnumerable SkipWhile(this IAsyncEnumerable source, Func> predicate) => SkipWhileAwaitWithCancellation(source, predicate); - public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsync(source, selector, cancellationToken); - public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsync(source, selector, cancellationToken); - public static IAsyncEnumerable TakeWhile(this IAsyncEnumerable source, Func> predicate) => TakeWhileAwaitWithCancellation(source, predicate); - public static IAsyncEnumerable TakeWhile(this IAsyncEnumerable source, Func> predicate) => TakeWhileAwaitWithCancellation(source, predicate); - public static IOrderedAsyncEnumerable ThenBy(this IOrderedAsyncEnumerable source, Func> keySelector) => ThenByAwaitWithCancellation(source, keySelector); - public static IOrderedAsyncEnumerable ThenBy(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) => ThenByAwaitWithCancellation(source, keySelector, comparer); - public static IOrderedAsyncEnumerable ThenByDescending(this IOrderedAsyncEnumerable source, Func> keySelector) => ThenByDescendingAwaitWithCancellation(source, keySelector); - public static IOrderedAsyncEnumerable ThenByDescending(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) => ThenByDescendingAwaitWithCancellation(source, keySelector, comparer); - public static ValueTask> ToDictionaryAsync(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken) => ToDictionaryAwaitWithCancellationAsync(source, keySelector, cancellationToken); - public static ValueTask> ToDictionaryAsync(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) => ToDictionaryAwaitWithCancellationAsync(source, keySelector, comparer, cancellationToken); - public static ValueTask> ToDictionaryAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken) => ToDictionaryAwaitWithCancellationAsync(source, keySelector, elementSelector, cancellationToken); - public static ValueTask> ToDictionaryAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken) => ToDictionaryAwaitWithCancellationAsync(source, keySelector, elementSelector, comparer, cancellationToken); - public static ValueTask> ToLookupAsync(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken) => ToLookupAwaitWithCancellationAsync(source, keySelector, cancellationToken); - public static ValueTask> ToLookupAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken) => ToLookupAwaitWithCancellationAsync(source, keySelector, elementSelector, cancellationToken); - public static ValueTask> ToLookupAsync(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) => ToLookupAwaitWithCancellationAsync(source, keySelector, comparer, cancellationToken); - public static ValueTask> ToLookupAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken) => ToLookupAwaitWithCancellationAsync(source, keySelector, elementSelector, comparer, cancellationToken); - public static IAsyncEnumerable Where(this IAsyncEnumerable source, Func> predicate) => WhereAwaitWithCancellation(source, predicate); - public static IAsyncEnumerable Where(this IAsyncEnumerable source, Func> predicate) => WhereAwaitWithCancellation(source, predicate); - public static IAsyncEnumerable Zip(this IAsyncEnumerable first, IAsyncEnumerable second, Func> selector) => ZipAwaitWithCancellation(first, second, selector); + public static ValueTask AggregateAsync(this IAsyncEnumerable source, Func> accumulator, CancellationToken cancellationToken) => AggregateAwaitWithCancellationAsyncCore(source, accumulator, cancellationToken); + public static ValueTask AggregateAsync(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, CancellationToken cancellationToken) => AggregateAwaitWithCancellationAsyncCore(source, seed, accumulator, cancellationToken); + public static ValueTask AggregateAsync(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, Func> resultSelector, CancellationToken cancellationToken) => AggregateAwaitWithCancellationAsyncCore(source, seed, accumulator, resultSelector, cancellationToken); + public static ValueTask AllAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => AllAwaitWithCancellationAsyncCore(source, predicate, cancellationToken); + public static ValueTask AnyAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => AnyAwaitWithCancellationAsyncCore(source, predicate, cancellationToken); + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask CountAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => CountAwaitWithCancellationAsyncCore(source, predicate, cancellationToken); + public static ValueTask FirstAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => FirstAwaitWithCancellationAsyncCore(source, predicate, cancellationToken); + public static ValueTask FirstOrDefaultAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => FirstOrDefaultAwaitWithCancellationAsyncCore(source, predicate, cancellationToken); + public static Task ForEachAsync(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken) => ForEachAwaitWithCancellationAsyncCore(source, action, cancellationToken); + public static Task ForEachAsync(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken) => ForEachAwaitWithCancellationAsyncCore(source, action, cancellationToken); + public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func> keySelector) => GroupByAwaitWithCancellationCore(source, keySelector); + public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector) => GroupByAwaitWithCancellationCore(source, keySelector, elementSelector); + public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func> keySelector, Func, CancellationToken, ValueTask> resultSelector) => GroupByAwaitWithCancellationCore(source, keySelector, resultSelector); + public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer) => GroupByAwaitWithCancellationCore(source, keySelector, comparer); + public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer) => GroupByAwaitWithCancellationCore(source, keySelector, elementSelector, comparer); + public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func> keySelector, Func, CancellationToken, ValueTask> resultSelector, IEqualityComparer comparer) => GroupByAwaitWithCancellationCore(source, keySelector, resultSelector, comparer); + public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, CancellationToken, ValueTask> resultSelector) => GroupByAwaitWithCancellationCore(source, keySelector, elementSelector, resultSelector); + public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, CancellationToken, ValueTask> resultSelector, IEqualityComparer comparer) => GroupByAwaitWithCancellationCore(source, keySelector, elementSelector, resultSelector, comparer); + public static IAsyncEnumerable GroupJoin(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, CancellationToken, ValueTask> resultSelector) => GroupJoinAwaitWithCancellationCore(outer, inner, outerKeySelector, innerKeySelector, resultSelector); + public static IAsyncEnumerable GroupJoin(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, CancellationToken, ValueTask> resultSelector, IEqualityComparer comparer) => GroupJoinAwaitWithCancellationCore(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer); + public static IAsyncEnumerable Join(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector) => JoinAwaitWithCancellationCore(outer, inner, outerKeySelector, innerKeySelector, resultSelector); + public static IAsyncEnumerable Join(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector, IEqualityComparer comparer) => JoinAwaitWithCancellationCore(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer); + public static ValueTask LastAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => LastAwaitWithCancellationAsyncCore(source, predicate, cancellationToken); + public static ValueTask LastOrDefaultAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => LastOrDefaultAwaitWithCancellationAsyncCore(source, predicate, cancellationToken); + public static ValueTask LongCountAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => LongCountAwaitWithCancellationAsyncCore(source, predicate, cancellationToken); + public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static IOrderedAsyncEnumerable OrderBy(this IAsyncEnumerable source, Func> keySelector) => OrderByAwaitWithCancellationCore(source, keySelector); + public static IOrderedAsyncEnumerable OrderBy(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => OrderByAwaitWithCancellationCore(source, keySelector, comparer); + public static IOrderedAsyncEnumerable OrderByDescending(this IAsyncEnumerable source, Func> keySelector) => OrderByDescendingAwaitWithCancellationCore(source, keySelector); + public static IOrderedAsyncEnumerable OrderByDescending(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => OrderByDescendingAwaitWithCancellationCore(source, keySelector, comparer); + public static IAsyncEnumerable Select(this IAsyncEnumerable source, Func> selector) => SelectAwaitWithCancellationCore(source, selector); + public static IAsyncEnumerable Select(this IAsyncEnumerable source, Func> selector) => SelectAwaitWithCancellationCore(source, selector); + public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, Func>> selector) => SelectManyAwaitWithCancellationCore(source, selector); + public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, Func>> selector) => SelectManyAwaitWithCancellationCore(source, selector); + public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) => SelectManyAwaitWithCancellationCore(source, collectionSelector, resultSelector); + public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) => SelectManyAwaitWithCancellationCore(source, collectionSelector, resultSelector); + public static ValueTask SingleAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => SingleAwaitWithCancellationAsyncCore(source, predicate, cancellationToken); + public static ValueTask SingleOrDefaultAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => SingleOrDefaultAwaitWithCancellationAsyncCore(source, predicate, cancellationToken); + public static IAsyncEnumerable SkipWhile(this IAsyncEnumerable source, Func> predicate) => SkipWhileAwaitWithCancellationCore(source, predicate); + public static IAsyncEnumerable SkipWhile(this IAsyncEnumerable source, Func> predicate) => SkipWhileAwaitWithCancellationCore(source, predicate); + public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static IAsyncEnumerable TakeWhile(this IAsyncEnumerable source, Func> predicate) => TakeWhileAwaitWithCancellationCore(source, predicate); + public static IAsyncEnumerable TakeWhile(this IAsyncEnumerable source, Func> predicate) => TakeWhileAwaitWithCancellationCore(source, predicate); + public static IOrderedAsyncEnumerable ThenBy(this IOrderedAsyncEnumerable source, Func> keySelector) => ThenByAwaitWithCancellationCore(source, keySelector); + public static IOrderedAsyncEnumerable ThenBy(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) => ThenByAwaitWithCancellationCore(source, keySelector, comparer); + public static IOrderedAsyncEnumerable ThenByDescending(this IOrderedAsyncEnumerable source, Func> keySelector) => ThenByDescendingAwaitWithCancellationCore(source, keySelector); + public static IOrderedAsyncEnumerable ThenByDescending(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) => ThenByDescendingAwaitWithCancellationCore(source, keySelector, comparer); + public static ValueTask> ToDictionaryAsync(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken) => ToDictionaryAwaitWithCancellationAsyncCore(source, keySelector, cancellationToken); + public static ValueTask> ToDictionaryAsync(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) => ToDictionaryAwaitWithCancellationAsyncCore(source, keySelector, comparer, cancellationToken); + public static ValueTask> ToDictionaryAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken) => ToDictionaryAwaitWithCancellationAsyncCore(source, keySelector, elementSelector, cancellationToken); + public static ValueTask> ToDictionaryAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken) => ToDictionaryAwaitWithCancellationAsyncCore(source, keySelector, elementSelector, comparer, cancellationToken); + public static ValueTask> ToLookupAsync(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken) => ToLookupAwaitWithCancellationAsyncCore(source, keySelector, cancellationToken); + public static ValueTask> ToLookupAsync(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) => ToLookupAwaitWithCancellationAsyncCore(source, keySelector, comparer, cancellationToken); + public static ValueTask> ToLookupAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken) => ToLookupAwaitWithCancellationAsyncCore(source, keySelector, elementSelector, cancellationToken); + public static ValueTask> ToLookupAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken) => ToLookupAwaitWithCancellationAsyncCore(source, keySelector, elementSelector, comparer, cancellationToken); + public static IAsyncEnumerable Where(this IAsyncEnumerable source, Func> predicate) => WhereAwaitWithCancellationCore(source, predicate); + public static IAsyncEnumerable Where(this IAsyncEnumerable source, Func> predicate) => WhereAwaitWithCancellationCore(source, predicate); + public static IAsyncEnumerable Zip(this IAsyncEnumerable first, IAsyncEnumerable second, Func> selector) => ZipAwaitWithCancellationCore(first, second, selector); #endif - } -} +#else + public static ValueTask AggregateAwaitAsync(this IAsyncEnumerable source, Func> accumulator, CancellationToken cancellationToken) => AggregateAwaitAsyncCore(source, accumulator, cancellationToken); + public static ValueTask AggregateAwaitAsync(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, CancellationToken cancellationToken) => AggregateAwaitAsyncCore(source, seed, accumulator, cancellationToken); + public static ValueTask AggregateAwaitAsync(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, Func> resultSelector, CancellationToken cancellationToken) => AggregateAwaitAsyncCore(source, seed, accumulator, resultSelector, cancellationToken); + public static ValueTask AllAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => AllAwaitAsyncCore(source, predicate, cancellationToken); + public static ValueTask AnyAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => AnyAwaitAsyncCore(source, predicate, cancellationToken); + public static ValueTask AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask CountAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => CountAwaitAsyncCore(source, predicate, cancellationToken); + public static ValueTask FirstAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => FirstAwaitAsyncCore(source, predicate, cancellationToken); + public static ValueTask FirstOrDefaultAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => FirstOrDefaultAwaitAsyncCore(source, predicate, cancellationToken); + public static Task ForEachAwaitAsync(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken) => ForEachAwaitAsyncCore(source, action, cancellationToken); + public static Task ForEachAwaitAsync(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken) => ForEachAwaitAsyncCore(source, action, cancellationToken); + public static IAsyncEnumerable> GroupByAwait(this IAsyncEnumerable source, Func> keySelector) => GroupByAwaitCore(source, keySelector); + public static IAsyncEnumerable GroupByAwait(this IAsyncEnumerable source, Func> keySelector, Func, ValueTask> resultSelector) => GroupByAwaitCore(source, keySelector, resultSelector); + public static IAsyncEnumerable> GroupByAwait(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer) => GroupByAwaitCore(source, keySelector, comparer); + public static IAsyncEnumerable> GroupByAwait(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector) => GroupByAwaitCore(source, keySelector, elementSelector); + public static IAsyncEnumerable GroupByAwait(this IAsyncEnumerable source, Func> keySelector, Func, ValueTask> resultSelector, IEqualityComparer comparer) => GroupByAwaitCore(source, keySelector, resultSelector, comparer); + public static IAsyncEnumerable GroupByAwait(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, ValueTask> resultSelector) => GroupByAwaitCore(source, keySelector, elementSelector, resultSelector); + public static IAsyncEnumerable> GroupByAwait(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer) => GroupByAwaitCore(source, keySelector, elementSelector, comparer); + public static IAsyncEnumerable GroupByAwait(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, ValueTask> resultSelector, IEqualityComparer comparer) => GroupByAwaitCore(source, keySelector, elementSelector, resultSelector, comparer); + public static IAsyncEnumerable GroupJoinAwait(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, ValueTask> resultSelector) => GroupJoinAwaitCore(outer, inner, outerKeySelector, innerKeySelector, resultSelector); + public static IAsyncEnumerable GroupJoinAwait(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, ValueTask> resultSelector, IEqualityComparer comparer) => GroupJoinAwaitCore(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer); + public static IAsyncEnumerable JoinAwait(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector) => JoinAwaitCore(outer, inner, outerKeySelector, innerKeySelector, resultSelector); + public static IAsyncEnumerable JoinAwait(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector, IEqualityComparer comparer) => JoinAwaitCore(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer); + public static ValueTask LastAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => LastAwaitAsyncCore(source, predicate, cancellationToken); + public static ValueTask LastOrDefaultAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => LastOrDefaultAwaitAsyncCore(source, predicate, cancellationToken); + public static ValueTask LongCountAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => LongCountAwaitAsyncCore(source, predicate, cancellationToken); + public static ValueTask MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitAsyncCore(source, selector, cancellationToken); + public static IOrderedAsyncEnumerable OrderByAwait(this IAsyncEnumerable source, Func> keySelector) => OrderByAwaitCore(source, keySelector); + public static IOrderedAsyncEnumerable OrderByAwait(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => OrderByAwaitCore(source, keySelector, comparer); + public static IOrderedAsyncEnumerable OrderByDescendingAwait(this IAsyncEnumerable source, Func> keySelector) => OrderByDescendingAwaitCore(source, keySelector); + public static IOrderedAsyncEnumerable OrderByDescendingAwait(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => OrderByDescendingAwaitCore(source, keySelector, comparer); + public static IAsyncEnumerable SelectAwait(this IAsyncEnumerable source, Func> selector) => SelectAwaitCore(source, selector); + public static IAsyncEnumerable SelectAwait(this IAsyncEnumerable source, Func> selector) => SelectAwaitCore(source, selector); + public static IAsyncEnumerable SelectManyAwait(this IAsyncEnumerable source, Func>> selector) => SelectManyAwaitCore(source, selector); + public static IAsyncEnumerable SelectManyAwait(this IAsyncEnumerable source, Func>> selector) => SelectManyAwaitCore(source, selector); + public static IAsyncEnumerable SelectManyAwait(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) => SelectManyAwaitCore(source, collectionSelector, resultSelector); + public static IAsyncEnumerable SelectManyAwait(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) => SelectManyAwaitCore(source, collectionSelector, resultSelector); + public static ValueTask SingleAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => SingleAwaitAsyncCore(source, predicate, cancellationToken); + public static ValueTask SingleOrDefaultAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => SingleOrDefaultAwaitAsyncCore(source, predicate, cancellationToken); + public static IAsyncEnumerable SkipWhileAwait(this IAsyncEnumerable source, Func> predicate) => SkipWhileAwaitCore(source, predicate); + public static IAsyncEnumerable SkipWhileAwait(this IAsyncEnumerable source, Func> predicate) => SkipWhileAwaitCore(source, predicate); + public static ValueTask SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitAsyncCore(source, selector, cancellationToken); + public static IAsyncEnumerable TakeWhileAwait(this IAsyncEnumerable source, Func> predicate) => TakeWhileAwaitCore(source, predicate); + public static IAsyncEnumerable TakeWhileAwait(this IAsyncEnumerable source, Func> predicate) => TakeWhileAwaitCore(source, predicate); + public static IOrderedAsyncEnumerable ThenByAwait(this IOrderedAsyncEnumerable source, Func> keySelector) => ThenByAwaitCore(source, keySelector); + public static IOrderedAsyncEnumerable ThenByAwait(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) => ThenByAwaitCore(source, keySelector, comparer); + public static IOrderedAsyncEnumerable ThenByDescendingAwait(this IOrderedAsyncEnumerable source, Func> keySelector) => ThenByDescendingAwaitCore(source, keySelector); + public static IOrderedAsyncEnumerable ThenByDescendingAwait(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) => ThenByDescendingAwaitCore(source, keySelector, comparer); + public static ValueTask> ToDictionaryAwaitAsync(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken) => ToDictionaryAwaitAsyncCore(source, keySelector, cancellationToken); + public static ValueTask> ToDictionaryAwaitAsync(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) => ToDictionaryAwaitAsyncCore(source, keySelector, comparer, cancellationToken); + public static ValueTask> ToDictionaryAwaitAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken) => ToDictionaryAwaitAsyncCore(source, keySelector, elementSelector, cancellationToken); + public static ValueTask> ToDictionaryAwaitAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken) => ToDictionaryAwaitAsyncCore(source, keySelector, elementSelector, comparer, cancellationToken); + public static ValueTask> ToLookupAwaitAsync(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken) => ToLookupAwaitAsyncCore(source, keySelector, cancellationToken); + public static ValueTask> ToLookupAwaitAsync(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) => ToLookupAwaitAsyncCore(source, keySelector, comparer, cancellationToken); + public static ValueTask> ToLookupAwaitAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken) => ToLookupAwaitAsyncCore(source, keySelector, elementSelector, cancellationToken); + public static ValueTask> ToLookupAwaitAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken) => ToLookupAwaitAsyncCore(source, keySelector, elementSelector, comparer, cancellationToken); + public static IAsyncEnumerable WhereAwait(this IAsyncEnumerable source, Func> predicate) => WhereAwaitCore(source, predicate); + public static IAsyncEnumerable WhereAwait(this IAsyncEnumerable source, Func> predicate) => WhereAwaitCore(source, predicate); + public static IAsyncEnumerable ZipAwait(this IAsyncEnumerable first, IAsyncEnumerable second, Func> selector) => ZipAwaitCore(first, second, selector); +#if !NO_DEEP_CANCELLATION + public static ValueTask AggregateAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> accumulator, CancellationToken cancellationToken) => AggregateAwaitWithCancellationAsyncCore(source, accumulator, cancellationToken); + public static ValueTask AggregateAwaitWithCancellationAsync(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, CancellationToken cancellationToken) => AggregateAwaitWithCancellationAsyncCore(source, seed, accumulator, cancellationToken); + public static ValueTask AggregateAwaitWithCancellationAsync(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, Func> resultSelector, CancellationToken cancellationToken) => AggregateAwaitWithCancellationAsyncCore(source, seed, accumulator, resultSelector, cancellationToken); + public static ValueTask AllAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => AllAwaitWithCancellationAsyncCore(source, predicate, cancellationToken); + public static ValueTask AnyAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => AnyAwaitWithCancellationAsyncCore(source, predicate, cancellationToken); + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => AverageAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask CountAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => CountAwaitWithCancellationAsyncCore(source, predicate, cancellationToken); + public static ValueTask FirstAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => FirstAwaitWithCancellationAsyncCore(source, predicate, cancellationToken); + public static ValueTask FirstOrDefaultAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => FirstOrDefaultAwaitWithCancellationAsyncCore(source, predicate, cancellationToken); + public static Task ForEachAwaitWithCancellationAsync(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken) => ForEachAwaitWithCancellationAsyncCore(source, action, cancellationToken); + public static Task ForEachAwaitWithCancellationAsync(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken) => ForEachAwaitWithCancellationAsyncCore(source, action, cancellationToken); + public static IAsyncEnumerable> GroupByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector) => GroupByAwaitWithCancellationCore(source, keySelector); + public static IAsyncEnumerable> GroupByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector) => GroupByAwaitWithCancellationCore(source, keySelector, elementSelector); + public static IAsyncEnumerable GroupByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector, Func, CancellationToken, ValueTask> resultSelector) => GroupByAwaitWithCancellationCore(source, keySelector, resultSelector); + public static IAsyncEnumerable> GroupByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer) => GroupByAwaitWithCancellationCore(source, keySelector, comparer); + public static IAsyncEnumerable> GroupByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer) => GroupByAwaitWithCancellationCore(source, keySelector, elementSelector, comparer); + public static IAsyncEnumerable GroupByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector, Func, CancellationToken, ValueTask> resultSelector, IEqualityComparer comparer) => GroupByAwaitWithCancellationCore(source, keySelector, resultSelector, comparer); + public static IAsyncEnumerable GroupByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, CancellationToken, ValueTask> resultSelector) => GroupByAwaitWithCancellationCore(source, keySelector, elementSelector, resultSelector); + public static IAsyncEnumerable GroupByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, CancellationToken, ValueTask> resultSelector, IEqualityComparer comparer) => GroupByAwaitWithCancellationCore(source, keySelector, elementSelector, resultSelector, comparer); + public static IAsyncEnumerable GroupJoinAwaitWithCancellation(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, CancellationToken, ValueTask> resultSelector) => GroupJoinAwaitWithCancellationCore(outer, inner, outerKeySelector, innerKeySelector, resultSelector); + public static IAsyncEnumerable GroupJoinAwaitWithCancellation(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, CancellationToken, ValueTask> resultSelector, IEqualityComparer comparer) => GroupJoinAwaitWithCancellationCore(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer); + public static IAsyncEnumerable JoinAwaitWithCancellation(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector) => JoinAwaitWithCancellationCore(outer, inner, outerKeySelector, innerKeySelector, resultSelector); + public static IAsyncEnumerable JoinAwaitWithCancellation(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector, IEqualityComparer comparer) => JoinAwaitWithCancellationCore(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer); + public static ValueTask LastAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => LastAwaitWithCancellationAsyncCore(source, predicate, cancellationToken); + public static ValueTask LastOrDefaultAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => LastOrDefaultAwaitWithCancellationAsyncCore(source, predicate, cancellationToken); + public static ValueTask LongCountAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => LongCountAwaitWithCancellationAsyncCore(source, predicate, cancellationToken); + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MaxAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => MinAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static IOrderedAsyncEnumerable OrderByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector) => OrderByAwaitWithCancellationCore(source, keySelector); + public static IOrderedAsyncEnumerable OrderByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => OrderByAwaitWithCancellationCore(source, keySelector, comparer); + public static IOrderedAsyncEnumerable OrderByDescendingAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector) => OrderByDescendingAwaitWithCancellationCore(source, keySelector); + public static IOrderedAsyncEnumerable OrderByDescendingAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => OrderByDescendingAwaitWithCancellationCore(source, keySelector, comparer); + public static IAsyncEnumerable SelectAwaitWithCancellation(this IAsyncEnumerable source, Func> selector) => SelectAwaitWithCancellationCore(source, selector); + public static IAsyncEnumerable SelectAwaitWithCancellation(this IAsyncEnumerable source, Func> selector) => SelectAwaitWithCancellationCore(source, selector); + public static IAsyncEnumerable SelectManyAwaitWithCancellation(this IAsyncEnumerable source, Func>> selector) => SelectManyAwaitWithCancellationCore(source, selector); + public static IAsyncEnumerable SelectManyAwaitWithCancellation(this IAsyncEnumerable source, Func>> selector) => SelectManyAwaitWithCancellationCore(source, selector); + public static IAsyncEnumerable SelectManyAwaitWithCancellation(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) => SelectManyAwaitWithCancellationCore(source, collectionSelector, resultSelector); + public static IAsyncEnumerable SelectManyAwaitWithCancellation(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) => SelectManyAwaitWithCancellationCore(source, collectionSelector, resultSelector); + public static ValueTask SingleAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => SingleAwaitWithCancellationAsyncCore(source, predicate, cancellationToken); + public static ValueTask SingleOrDefaultAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken) => SingleOrDefaultAwaitWithCancellationAsyncCore(source, predicate, cancellationToken); + public static IAsyncEnumerable SkipWhileAwaitWithCancellation(this IAsyncEnumerable source, Func> predicate) => SkipWhileAwaitWithCancellationCore(source, predicate); + public static IAsyncEnumerable SkipWhileAwaitWithCancellation(this IAsyncEnumerable source, Func> predicate) => SkipWhileAwaitWithCancellationCore(source, predicate); + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) => SumAwaitWithCancellationAsyncCore(source, selector, cancellationToken); + public static IAsyncEnumerable TakeWhileAwaitWithCancellation(this IAsyncEnumerable source, Func> predicate) => TakeWhileAwaitWithCancellationCore(source, predicate); + public static IAsyncEnumerable TakeWhileAwaitWithCancellation(this IAsyncEnumerable source, Func> predicate) => TakeWhileAwaitWithCancellationCore(source, predicate); + public static IOrderedAsyncEnumerable ThenByAwaitWithCancellation(this IOrderedAsyncEnumerable source, Func> keySelector) => ThenByAwaitWithCancellationCore(source, keySelector); + public static IOrderedAsyncEnumerable ThenByAwaitWithCancellation(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) => ThenByAwaitWithCancellationCore(source, keySelector, comparer); + public static IOrderedAsyncEnumerable ThenByDescendingAwaitWithCancellation(this IOrderedAsyncEnumerable source, Func> keySelector) => ThenByDescendingAwaitWithCancellationCore(source, keySelector); + public static IOrderedAsyncEnumerable ThenByDescendingAwaitWithCancellation(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) => ThenByDescendingAwaitWithCancellationCore(source, keySelector, comparer); + public static ValueTask> ToDictionaryAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken) => ToDictionaryAwaitWithCancellationAsyncCore(source, keySelector, cancellationToken); + public static ValueTask> ToDictionaryAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) => ToDictionaryAwaitWithCancellationAsyncCore(source, keySelector, comparer, cancellationToken); + public static ValueTask> ToDictionaryAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken) => ToDictionaryAwaitWithCancellationAsyncCore(source, keySelector, elementSelector, cancellationToken); + public static ValueTask> ToDictionaryAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken) => ToDictionaryAwaitWithCancellationAsyncCore(source, keySelector, elementSelector, comparer, cancellationToken); + public static ValueTask> ToLookupAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken) => ToLookupAwaitWithCancellationAsyncCore(source, keySelector, cancellationToken); + public static ValueTask> ToLookupAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) => ToLookupAwaitWithCancellationAsyncCore(source, keySelector, comparer, cancellationToken); + public static ValueTask> ToLookupAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken) => ToLookupAwaitWithCancellationAsyncCore(source, keySelector, elementSelector, cancellationToken); + public static ValueTask> ToLookupAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken) => ToLookupAwaitWithCancellationAsyncCore(source, keySelector, elementSelector, comparer, cancellationToken); + public static IAsyncEnumerable WhereAwaitWithCancellation(this IAsyncEnumerable source, Func> predicate) => WhereAwaitWithCancellationCore(source, predicate); + public static IAsyncEnumerable WhereAwaitWithCancellation(this IAsyncEnumerable source, Func> predicate) => WhereAwaitWithCancellationCore(source, predicate); + public static IAsyncEnumerable ZipAwaitWithCancellation(this IAsyncEnumerable first, IAsyncEnumerable second, Func> selector) => ZipAwaitWithCancellationCore(first, second, selector); +#endif #endif + } +} diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncEnumerable.AsyncOverloads.tt b/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncEnumerable.AsyncOverloads.tt index 884d65e124..957763b6ba 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncEnumerable.AsyncOverloads.tt +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncEnumerable.AsyncOverloads.tt @@ -11,16 +11,6 @@ <#@ import namespace="System.Linq" #> <#@ import namespace="System.Reflection" #> <#@ output extension=".cs" #> -#if SUPPORT_FLAT_ASYNC_API - -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -namespace System.Linq -{ - partial class AsyncEnumerable - { <# Func toCSharp = null; toCSharp = t => @@ -75,9 +65,21 @@ toCSharp = t => return t.Name; } }; +#> +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; -var methods = typeof(AsyncEnumerable).GetMethods(BindingFlags.Public | BindingFlags.Static); -var asyncMethods = methods.Where(m => m.Name.Contains("Await")).OrderBy(m => m.Name).ThenBy(m => m.GetParameters().Length); +namespace System.Linq +{ + partial class AsyncEnumerable + { +<# +var methods = typeof(AsyncEnumerable).GetMethods(BindingFlags.NonPublic | BindingFlags.Static); +var asyncMethods = methods.Where(m => m.Name.Contains("Await") && m.Name.EndsWith("Core")).OrderBy(m => m.Name).ThenBy(m => m.GetParameters().Length); +#> +#if SUPPORT_FLAT_ASYNC_API +<# foreach (var g in asyncMethods.GroupBy(m => m.Name.Contains("WithCancellation"))) { if (g.Key) @@ -91,7 +93,7 @@ foreach (var g in asyncMethods.GroupBy(m => m.Name.Contains("WithCancellation")) foreach (var m in g) { var longName = m.Name; - var shortName = m.Name.Replace("WithCancellation", "").Replace("Await", ""); + var shortName = m.Name.Replace("WithCancellation", "").Replace("Await", "").Replace("Core", ""); var genArgs = m.IsGenericMethod ? "<" + string.Join(", ", m.GetGenericArguments().Select(t => t.Name)) + ">" : ""; var returnType = toCSharp(m.ReturnType); var isExtension = m.IsDefined(typeof(System.Runtime.CompilerServices.ExtensionAttribute), true); @@ -110,7 +112,40 @@ foreach (var g in asyncMethods.GroupBy(m => m.Name.Contains("WithCancellation")) } } #> +#else +<# +foreach (var g in asyncMethods.GroupBy(m => m.Name.Contains("WithCancellation"))) +{ + if (g.Key) + { +#> + +#if !NO_DEEP_CANCELLATION +<# } -} + foreach (var m in g) + { + var longName = m.Name; + var shortName = m.Name.Replace("Core", ""); + var genArgs = m.IsGenericMethod ? "<" + string.Join(", ", m.GetGenericArguments().Select(t => t.Name)) + ">" : ""; + var returnType = toCSharp(m.ReturnType); + var isExtension = m.IsDefined(typeof(System.Runtime.CompilerServices.ExtensionAttribute), true); + var pars = (isExtension ? "this " : "") + string.Join(", ", m.GetParameters().Select(p => toCSharp(p.ParameterType) + " " + p.Name)); + var args = string.Join(", ", m.GetParameters().Select(p => p.Name)); +#> + public static <#=returnType#> <#=shortName#><#=genArgs#>(<#=pars#>) => <#=longName#><#=genArgs#>(<#=args#>); +<# + } + + if (g.Key) + { +#> #endif +<# + } +} +#> +#endif + } +} diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Aggregate.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Aggregate.cs index d2dab5cc1a..25a2dca49a 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Aggregate.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Aggregate.cs @@ -40,7 +40,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AggregateAwaitAsync(this IAsyncEnumerable source, Func> accumulator, CancellationToken cancellationToken = default) + internal static ValueTask AggregateAwaitAsyncCore(this IAsyncEnumerable source, Func> accumulator, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -71,7 +71,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AggregateAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> accumulator, CancellationToken cancellationToken = default) + internal static ValueTask AggregateAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> accumulator, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -124,7 +124,7 @@ static async ValueTask Core(IAsyncEnumerable _source, TAcc } } - public static ValueTask AggregateAwaitAsync(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, CancellationToken cancellationToken = default) + internal static ValueTask AggregateAwaitAsyncCore(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -147,7 +147,7 @@ static async ValueTask Core(IAsyncEnumerable _source, TAcc } #if !NO_DEEP_CANCELLATION - public static ValueTask AggregateAwaitWithCancellationAsync(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, CancellationToken cancellationToken = default) + internal static ValueTask AggregateAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -194,7 +194,7 @@ static async ValueTask Core(IAsyncEnumerable _source, TAccumul } } - public static ValueTask AggregateAwaitAsync(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, Func> resultSelector, CancellationToken cancellationToken = default) + internal static ValueTask AggregateAwaitAsyncCore(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, Func> resultSelector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -219,7 +219,7 @@ static async ValueTask Core(IAsyncEnumerable _source, TAccumul } #if !NO_DEEP_CANCELLATION - public static ValueTask AggregateAwaitWithCancellationAsync(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, Func> resultSelector, CancellationToken cancellationToken = default) + internal static ValueTask AggregateAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, Func> resultSelector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/All.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/All.cs index 46041173f8..a3a3dcc604 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/All.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/All.cs @@ -33,7 +33,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AllAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + internal static ValueTask AllAwaitAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -57,7 +57,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AllAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + internal static ValueTask AllAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Any.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Any.cs index 550581f028..9bfa93f50f 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Any.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Any.cs @@ -49,7 +49,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AnyAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + internal static ValueTask AnyAwaitAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -73,7 +73,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AnyAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + internal static ValueTask AnyAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Average.Generated.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Average.Generated.cs index d6aa470397..f6b25602c4 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Average.Generated.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Average.Generated.cs @@ -76,7 +76,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -111,7 +111,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -212,7 +212,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -247,7 +247,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -348,7 +348,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -383,7 +383,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -484,7 +484,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -519,7 +519,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -620,7 +620,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -655,7 +655,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -772,7 +772,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -815,7 +815,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -940,7 +940,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -983,7 +983,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1108,7 +1108,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1151,7 +1151,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1276,7 +1276,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1319,7 +1319,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1444,7 +1444,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1487,7 +1487,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Average.Generated.tt b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Average.Generated.tt index e7a0ef8393..e4cca983db 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Average.Generated.tt +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Average.Generated.tt @@ -191,7 +191,8 @@ else } } - public static ValueTask<<#=o.res#>> AverageAwaitAsync(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) + internal static ValueTask<<#=o.res#>> AverageAsyncCore(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) + { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -266,7 +267,8 @@ else } #if !NO_DEEP_CANCELLATION - public static ValueTask<<#=o.res#>> AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) + internal static ValueTask<<#=o.res#>> AverageWithCancellationAsyncCore(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) + { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Count.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Count.cs index f0ac22ddf9..a6ac535a2e 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Count.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Count.cs @@ -72,7 +72,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func CountAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + internal static ValueTask CountAwaitAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -101,7 +101,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func CountAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + internal static ValueTask CountAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/First.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/First.cs index 98f06c9f95..0eb78c39b8 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/First.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/First.cs @@ -42,7 +42,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func FirstAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + internal static ValueTask FirstAwaitAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -60,7 +60,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func FirstAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + internal static ValueTask FirstAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/FirstOrDefault.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/FirstOrDefault.cs index 2869761cb7..0fc1358c61 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/FirstOrDefault.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/FirstOrDefault.cs @@ -42,7 +42,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func FirstOrDefaultAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + internal static ValueTask FirstOrDefaultAwaitAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -60,7 +60,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func FirstOrDefaultAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + internal static ValueTask FirstOrDefaultAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ForEach.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ForEach.cs index 8e68b35990..8ad5d65dcb 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ForEach.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ForEach.cs @@ -55,7 +55,7 @@ static async Task Core(IAsyncEnumerable _source, Action _ } } - public static Task ForEachAwaitAsync(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken = default) + internal static Task ForEachAwaitAsyncCore(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -73,7 +73,7 @@ static async Task Core(IAsyncEnumerable _source, Func _a } } - public static Task ForEachAwaitWithCancellationAsync(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken) + internal static Task ForEachAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -91,7 +91,7 @@ static async Task Core(IAsyncEnumerable _source, Func(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken = default) + internal static Task ForEachAwaitAsyncCore(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -111,7 +111,7 @@ static async Task Core(IAsyncEnumerable _source, Func(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken) + internal static Task ForEachAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/GroupBy.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/GroupBy.cs index c4477ce4d0..7893d79d35 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/GroupBy.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/GroupBy.cs @@ -16,17 +16,17 @@ public static IAsyncEnumerable> GroupBy> GroupBy(this IAsyncEnumerable source, Func keySelector, IEqualityComparer comparer) => new GroupedAsyncEnumerable(source, keySelector, comparer); - public static IAsyncEnumerable> GroupByAwait(this IAsyncEnumerable source, Func> keySelector) => + internal static IAsyncEnumerable> GroupByAwaitCore(this IAsyncEnumerable source, Func> keySelector) => new GroupedAsyncEnumerableWithTask(source, keySelector, comparer: null); - public static IAsyncEnumerable> GroupByAwait(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer) => + internal static IAsyncEnumerable> GroupByAwaitCore(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer) => new GroupedAsyncEnumerableWithTask(source, keySelector, comparer); #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable> GroupByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector) => + internal static IAsyncEnumerable> GroupByAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector) => new GroupedAsyncEnumerableWithTaskAndCancellation(source, keySelector, comparer: null); - public static IAsyncEnumerable> GroupByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer) => + internal static IAsyncEnumerable> GroupByAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer) => new GroupedAsyncEnumerableWithTaskAndCancellation(source, keySelector, comparer); #endif @@ -36,17 +36,17 @@ public static IAsyncEnumerable> GroupBy> GroupBy(this IAsyncEnumerable source, Func keySelector, Func elementSelector, IEqualityComparer comparer) => new GroupedAsyncEnumerable(source, keySelector, elementSelector, comparer); - public static IAsyncEnumerable> GroupByAwait(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector) => + internal static IAsyncEnumerable> GroupByAwaitCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector) => new GroupedAsyncEnumerableWithTask(source, keySelector, elementSelector, comparer: null); - public static IAsyncEnumerable> GroupByAwait(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer) => + internal static IAsyncEnumerable> GroupByAwaitCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer) => new GroupedAsyncEnumerableWithTask(source, keySelector, elementSelector, comparer); #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable> GroupByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector) => + internal static IAsyncEnumerable> GroupByAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector) => new GroupedAsyncEnumerableWithTaskAndCancellation(source, keySelector, elementSelector, comparer: null); - public static IAsyncEnumerable> GroupByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer) => + internal static IAsyncEnumerable> GroupByAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer) => new GroupedAsyncEnumerableWithTaskAndCancellation(source, keySelector, elementSelector, comparer); #endif @@ -56,17 +56,17 @@ public static IAsyncEnumerable GroupBy(this IAs public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func keySelector, Func, TResult> resultSelector, IEqualityComparer comparer) => new GroupedResultAsyncEnumerable(source, keySelector, resultSelector, comparer); - public static IAsyncEnumerable GroupByAwait(this IAsyncEnumerable source, Func> keySelector, Func, ValueTask> resultSelector) => + internal static IAsyncEnumerable GroupByAwaitCore(this IAsyncEnumerable source, Func> keySelector, Func, ValueTask> resultSelector) => new GroupedResultAsyncEnumerableWithTask(source, keySelector, resultSelector, comparer: null); - public static IAsyncEnumerable GroupByAwait(this IAsyncEnumerable source, Func> keySelector, Func, ValueTask> resultSelector, IEqualityComparer comparer) => + internal static IAsyncEnumerable GroupByAwaitCore(this IAsyncEnumerable source, Func> keySelector, Func, ValueTask> resultSelector, IEqualityComparer comparer) => new GroupedResultAsyncEnumerableWithTask(source, keySelector, resultSelector, comparer); #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable GroupByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector, Func, CancellationToken, ValueTask> resultSelector) => + internal static IAsyncEnumerable GroupByAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector, Func, CancellationToken, ValueTask> resultSelector) => new GroupedResultAsyncEnumerableWithTaskAndCancellation(source, keySelector, resultSelector, comparer: null); - public static IAsyncEnumerable GroupByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector, Func, CancellationToken, ValueTask> resultSelector, IEqualityComparer comparer) => + internal static IAsyncEnumerable GroupByAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector, Func, CancellationToken, ValueTask> resultSelector, IEqualityComparer comparer) => new GroupedResultAsyncEnumerableWithTaskAndCancellation(source, keySelector, resultSelector, comparer); #endif @@ -76,17 +76,17 @@ public static IAsyncEnumerable GroupBy GroupBy(this IAsyncEnumerable source, Func keySelector, Func elementSelector, Func, TResult> resultSelector, IEqualityComparer comparer) => new GroupedResultAsyncEnumerable(source, keySelector, elementSelector, resultSelector, comparer); - public static IAsyncEnumerable GroupByAwait(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, ValueTask> resultSelector) => + internal static IAsyncEnumerable GroupByAwaitCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, ValueTask> resultSelector) => new GroupedResultAsyncEnumerableWithTask(source, keySelector, elementSelector, resultSelector, comparer: null); - public static IAsyncEnumerable GroupByAwait(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, ValueTask> resultSelector, IEqualityComparer comparer) => + internal static IAsyncEnumerable GroupByAwaitCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, ValueTask> resultSelector, IEqualityComparer comparer) => new GroupedResultAsyncEnumerableWithTask(source, keySelector, elementSelector, resultSelector, comparer); #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable GroupByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, CancellationToken, ValueTask> resultSelector) => + internal static IAsyncEnumerable GroupByAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, CancellationToken, ValueTask> resultSelector) => new GroupedResultAsyncEnumerableWithTaskAndCancellation(source, keySelector, elementSelector, resultSelector, comparer: null); - public static IAsyncEnumerable GroupByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, CancellationToken, ValueTask> resultSelector, IEqualityComparer comparer) => + internal static IAsyncEnumerable GroupByAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, CancellationToken, ValueTask> resultSelector, IEqualityComparer comparer) => new GroupedResultAsyncEnumerableWithTaskAndCancellation(source, keySelector, elementSelector, resultSelector, comparer); #endif @@ -220,7 +220,7 @@ protected override async ValueTask MoveNextCore() { case AsyncIteratorState.Allocated: _lookup = await Internal.LookupWithTask.CreateAsync(_source, _keySelector, _comparer, _cancellationToken).ConfigureAwait(false); - _enumerator = _lookup.SelectAwait(async g => await _resultSelector(g.Key, g).ConfigureAwait(false)).GetAsyncEnumerator(_cancellationToken); // REVIEW: Introduce another ApplyResultSelector? + _enumerator = _lookup.SelectAwaitCore(async g => await _resultSelector(g.Key, g).ConfigureAwait(false)).GetAsyncEnumerator(_cancellationToken); // REVIEW: Introduce another ApplyResultSelector? _state = AsyncIteratorState.Iterating; goto case AsyncIteratorState.Iterating; @@ -310,7 +310,7 @@ protected override async ValueTask MoveNextCore() { case AsyncIteratorState.Allocated: _lookup = await Internal.LookupWithTask.CreateAsync(_source, _keySelector, _comparer, _cancellationToken).ConfigureAwait(false); - _enumerator = _lookup.SelectAwait(async g => await _resultSelector(g.Key, g, _cancellationToken).ConfigureAwait(false)).GetAsyncEnumerator(_cancellationToken); // REVIEW: Introduce another ApplyResultSelector? + _enumerator = _lookup.SelectAwaitCore(async g => await _resultSelector(g.Key, g, _cancellationToken).ConfigureAwait(false)).GetAsyncEnumerator(_cancellationToken); // REVIEW: Introduce another ApplyResultSelector? _state = AsyncIteratorState.Iterating; goto case AsyncIteratorState.Iterating; @@ -493,7 +493,7 @@ protected override async ValueTask MoveNextCore() { case AsyncIteratorState.Allocated: _lookup = await Internal.LookupWithTask.CreateAsync(_source, _keySelector, _elementSelector, _comparer, _cancellationToken).ConfigureAwait(false); - _enumerator = _lookup.SelectAwait(async g => await _resultSelector(g.Key, g).ConfigureAwait(false)).GetAsyncEnumerator(_cancellationToken); // REVIEW: Introduce another ApplyResultSelector? + _enumerator = _lookup.SelectAwaitCore(async g => await _resultSelector(g.Key, g).ConfigureAwait(false)).GetAsyncEnumerator(_cancellationToken); // REVIEW: Introduce another ApplyResultSelector? _state = AsyncIteratorState.Iterating; goto case AsyncIteratorState.Iterating; @@ -585,7 +585,7 @@ protected override async ValueTask MoveNextCore() { case AsyncIteratorState.Allocated: _lookup = await Internal.LookupWithTask.CreateAsync(_source, _keySelector, _elementSelector, _comparer, _cancellationToken).ConfigureAwait(false); - _enumerator = _lookup.SelectAwait(async g => await _resultSelector(g.Key, g, _cancellationToken).ConfigureAwait(false)).GetAsyncEnumerator(_cancellationToken); // REVIEW: Introduce another ApplyResultSelector? + _enumerator = _lookup.SelectAwaitCore(async g => await _resultSelector(g.Key, g, _cancellationToken).ConfigureAwait(false)).GetAsyncEnumerator(_cancellationToken); // REVIEW: Introduce another ApplyResultSelector? _state = AsyncIteratorState.Iterating; goto case AsyncIteratorState.Iterating; diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/GroupJoin.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/GroupJoin.cs index c9415468ae..d67038a2e6 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/GroupJoin.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/GroupJoin.cs @@ -52,10 +52,10 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) #endif } - public static IAsyncEnumerable GroupJoinAwait(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, ValueTask> resultSelector) => - GroupJoinAwait(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer: null); + internal static IAsyncEnumerable GroupJoinAwaitCore(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, ValueTask> resultSelector) => + GroupJoinAwaitCore(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer: null); - public static IAsyncEnumerable GroupJoinAwait(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, ValueTask> resultSelector, IEqualityComparer comparer) + internal static IAsyncEnumerable GroupJoinAwaitCore(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, ValueTask> resultSelector, IEqualityComparer comparer) { if (outer == null) throw Error.ArgumentNull(nameof(outer)); @@ -95,10 +95,10 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable GroupJoinAwaitWithCancellation(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, CancellationToken, ValueTask> resultSelector) => - GroupJoinAwaitWithCancellation(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer: null); + internal static IAsyncEnumerable GroupJoinAwaitWithCancellationCore(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, CancellationToken, ValueTask> resultSelector) => + GroupJoinAwaitWithCancellationCore(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer: null); - public static IAsyncEnumerable GroupJoinAwaitWithCancellation(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, CancellationToken, ValueTask> resultSelector, IEqualityComparer comparer) + internal static IAsyncEnumerable GroupJoinAwaitWithCancellationCore(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, CancellationToken, ValueTask> resultSelector, IEqualityComparer comparer) { if (outer == null) throw Error.ArgumentNull(nameof(outer)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Join.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Join.cs index b00948e7b8..c638c3d6b8 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Join.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Join.cs @@ -69,10 +69,10 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) #endif } - public static IAsyncEnumerable JoinAwait(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector) => - JoinAwait(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer: null); + internal static IAsyncEnumerable JoinAwaitCore(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector) => + JoinAwaitCore(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer: null); - public static IAsyncEnumerable JoinAwait(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector, IEqualityComparer comparer) + internal static IAsyncEnumerable JoinAwaitCore(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector, IEqualityComparer comparer) { if (outer == null) throw Error.ArgumentNull(nameof(outer)); @@ -128,10 +128,10 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable JoinAwaitWithCancellation(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector) => - JoinAwaitWithCancellation(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer: null); + internal static IAsyncEnumerable JoinAwaitWithCancellationCore(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector) => + JoinAwaitWithCancellationCore(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer: null); - public static IAsyncEnumerable JoinAwaitWithCancellation(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector, IEqualityComparer comparer) + internal static IAsyncEnumerable JoinAwaitWithCancellationCore(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector, IEqualityComparer comparer) { if (outer == null) throw Error.ArgumentNull(nameof(outer)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Last.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Last.cs index 45e1d101b9..b92681e705 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Last.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Last.cs @@ -42,7 +42,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func LastAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + internal static ValueTask LastAwaitAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -60,7 +60,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func LastAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + internal static ValueTask LastAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/LastOrDefault.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/LastOrDefault.cs index cf8b15e19f..66e1f2618d 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/LastOrDefault.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/LastOrDefault.cs @@ -42,7 +42,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func LastOrDefaultAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + internal static ValueTask LastOrDefaultAwaitAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -60,7 +60,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func LastOrDefaultAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + internal static ValueTask LastOrDefaultAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/LongCount.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/LongCount.cs index 3a7134e022..c48995ea6d 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/LongCount.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/LongCount.cs @@ -61,7 +61,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func LongCountAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + internal static ValueTask LongCountAwaitAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -90,7 +90,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func LongCountAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + internal static ValueTask LongCountAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Max.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Max.cs index 4d61d9f082..3e49b367e6 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Max.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Max.cs @@ -164,7 +164,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MaxAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -244,7 +244,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MaxAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Min.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Min.cs index 9a7889e8ed..88797df30b 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Min.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Min.cs @@ -166,7 +166,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MinAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -246,7 +246,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MinAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/MinMax.Generated.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/MinMax.Generated.cs index c8770a7e2d..29485d7830 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/MinMax.Generated.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/MinMax.Generated.cs @@ -80,7 +80,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MaxAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -117,7 +117,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MaxAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -302,7 +302,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MaxAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -378,7 +378,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MaxAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -524,7 +524,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MaxAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -561,7 +561,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MaxAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -746,7 +746,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MaxAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -822,7 +822,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MaxAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -998,7 +998,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MaxAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1050,7 +1050,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MaxAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1242,7 +1242,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MaxAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1314,7 +1314,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MaxAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1486,7 +1486,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MaxAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1538,7 +1538,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MaxAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1730,7 +1730,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MaxAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1802,7 +1802,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MaxAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1944,7 +1944,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MaxAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1981,7 +1981,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MaxAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -2114,7 +2114,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MaxAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -2164,7 +2164,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MaxAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -2284,7 +2284,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MinAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -2321,7 +2321,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MinAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -2458,7 +2458,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MinAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -2510,7 +2510,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MinAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -2632,7 +2632,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MinAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -2669,7 +2669,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MinAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -2806,7 +2806,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MinAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -2858,7 +2858,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MinAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -3012,7 +3012,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MinAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -3065,7 +3065,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MinAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -3250,7 +3250,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MinAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -3318,7 +3318,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MinAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -3488,7 +3488,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MinAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -3541,7 +3541,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MinAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -3726,7 +3726,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MinAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -3794,7 +3794,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MinAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -3932,7 +3932,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MinAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -3969,7 +3969,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MinAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -4102,7 +4102,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MinAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -4152,7 +4152,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask MinAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/MinMax.Generated.tt b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/MinMax.Generated.tt index 6022691633..c72e6f78e1 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/MinMax.Generated.tt +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/MinMax.Generated.tt @@ -284,8 +284,11 @@ foreach (var overload in new[] { new { selector = "Func>", invoke = "await _selector(e.Current, _cancellationToken).ConfigureAwait(false)" }, }) { + var isAsync = overload.invoke.StartsWith("await"); var isDeepCancellation = overload.selector.Contains("CancellationToken"); - var suffix = overload.invoke.StartsWith("await") ? "Await" : ""; + var suffix = isAsync ? "Await" : ""; + var visibility = isAsync ? "internal" : "public"; + var core = isAsync ? "Core" : ""; if (isDeepCancellation) { @@ -295,7 +298,7 @@ foreach (var overload in new[] { <# } #> - public static ValueTask<<#=t#>> <#=m#><#=suffix#>Async(this IAsyncEnumerable source, <#=overload.selector#> selector, CancellationToken cancellationToken = default) + <#=visibility#> static ValueTask<<#=t#>> <#=m#><#=suffix#>Async<#=core#>(this IAsyncEnumerable source, <#=overload.selector#> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/OrderBy.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/OrderBy.cs index 34d2e8dd6c..93650da980 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/OrderBy.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/OrderBy.cs @@ -13,44 +13,44 @@ public static partial class AsyncEnumerable public static IOrderedAsyncEnumerable OrderBy(this IAsyncEnumerable source, Func keySelector) => new OrderedAsyncEnumerable(source, keySelector, comparer: null, descending: false, parent: null); - public static IOrderedAsyncEnumerable OrderByAwait(this IAsyncEnumerable source, Func> keySelector) => + internal static IOrderedAsyncEnumerable OrderByAwaitCore(this IAsyncEnumerable source, Func> keySelector) => new OrderedAsyncEnumerableWithTask(source, keySelector, comparer: null, descending: false, parent: null); #if !NO_DEEP_CANCELLATION - public static IOrderedAsyncEnumerable OrderByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector) => + internal static IOrderedAsyncEnumerable OrderByAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector) => new OrderedAsyncEnumerableWithTaskAndCancellation(source, keySelector, comparer: null, descending: false, parent: null); #endif public static IOrderedAsyncEnumerable OrderBy(this IAsyncEnumerable source, Func keySelector, IComparer comparer) => new OrderedAsyncEnumerable(source, keySelector, comparer, descending: false, parent: null); - public static IOrderedAsyncEnumerable OrderByAwait(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => + internal static IOrderedAsyncEnumerable OrderByAwaitCore(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => new OrderedAsyncEnumerableWithTask(source, keySelector, comparer, descending: false, parent: null); #if !NO_DEEP_CANCELLATION - public static IOrderedAsyncEnumerable OrderByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => + internal static IOrderedAsyncEnumerable OrderByAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => new OrderedAsyncEnumerableWithTaskAndCancellation(source, keySelector, comparer, descending: false, parent: null); #endif public static IOrderedAsyncEnumerable OrderByDescending(this IAsyncEnumerable source, Func keySelector) => new OrderedAsyncEnumerable(source, keySelector, comparer: null, descending: true, parent: null); - public static IOrderedAsyncEnumerable OrderByDescendingAwait(this IAsyncEnumerable source, Func> keySelector) => + internal static IOrderedAsyncEnumerable OrderByDescendingAwaitCore(this IAsyncEnumerable source, Func> keySelector) => new OrderedAsyncEnumerableWithTask(source, keySelector, comparer: null, descending: true, parent: null); #if !NO_DEEP_CANCELLATION - public static IOrderedAsyncEnumerable OrderByDescendingAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector) => + internal static IOrderedAsyncEnumerable OrderByDescendingAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector) => new OrderedAsyncEnumerableWithTaskAndCancellation(source, keySelector, comparer: null, descending: true, parent: null); #endif public static IOrderedAsyncEnumerable OrderByDescending(this IAsyncEnumerable source, Func keySelector, IComparer comparer) => new OrderedAsyncEnumerable(source, keySelector, comparer, descending: true, parent: null); - public static IOrderedAsyncEnumerable OrderByDescendingAwait(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => + internal static IOrderedAsyncEnumerable OrderByDescendingAwaitCore(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => new OrderedAsyncEnumerableWithTask(source, keySelector, comparer, descending: true, parent: null); #if !NO_DEEP_CANCELLATION - public static IOrderedAsyncEnumerable OrderByDescendingAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => + internal static IOrderedAsyncEnumerable OrderByDescendingAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => new OrderedAsyncEnumerableWithTaskAndCancellation(source, keySelector, comparer, descending: true, parent: null); #endif @@ -62,7 +62,7 @@ public static IOrderedAsyncEnumerable ThenBy(this IOrder return source.CreateOrderedEnumerable(keySelector, comparer: null, descending: false); } - public static IOrderedAsyncEnumerable ThenByAwait(this IOrderedAsyncEnumerable source, Func> keySelector) + internal static IOrderedAsyncEnumerable ThenByAwaitCore(this IOrderedAsyncEnumerable source, Func> keySelector) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -71,7 +71,7 @@ public static IOrderedAsyncEnumerable ThenByAwait(this I } #if !NO_DEEP_CANCELLATION - public static IOrderedAsyncEnumerable ThenByAwaitWithCancellation(this IOrderedAsyncEnumerable source, Func> keySelector) + internal static IOrderedAsyncEnumerable ThenByAwaitWithCancellationCore(this IOrderedAsyncEnumerable source, Func> keySelector) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -88,7 +88,7 @@ public static IOrderedAsyncEnumerable ThenBy(this IOrder return source.CreateOrderedEnumerable(keySelector, comparer, descending: false); } - public static IOrderedAsyncEnumerable ThenByAwait(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) + internal static IOrderedAsyncEnumerable ThenByAwaitCore(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -97,7 +97,7 @@ public static IOrderedAsyncEnumerable ThenByAwait(this I } #if !NO_DEEP_CANCELLATION - public static IOrderedAsyncEnumerable ThenByAwaitWithCancellation(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) + internal static IOrderedAsyncEnumerable ThenByAwaitWithCancellationCore(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -114,7 +114,7 @@ public static IOrderedAsyncEnumerable ThenByDescending(t return source.CreateOrderedEnumerable(keySelector, comparer: null, descending: true); } - public static IOrderedAsyncEnumerable ThenByDescendingAwait(this IOrderedAsyncEnumerable source, Func> keySelector) + internal static IOrderedAsyncEnumerable ThenByDescendingAwaitCore(this IOrderedAsyncEnumerable source, Func> keySelector) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -123,7 +123,7 @@ public static IOrderedAsyncEnumerable ThenByDescendingAwait ThenByDescendingAwaitWithCancellation(this IOrderedAsyncEnumerable source, Func> keySelector) + internal static IOrderedAsyncEnumerable ThenByDescendingAwaitWithCancellationCore(this IOrderedAsyncEnumerable source, Func> keySelector) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -140,7 +140,7 @@ public static IOrderedAsyncEnumerable ThenByDescending(t return source.CreateOrderedEnumerable(keySelector, comparer, descending: true); } - public static IOrderedAsyncEnumerable ThenByDescendingAwait(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) + internal static IOrderedAsyncEnumerable ThenByDescendingAwaitCore(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -149,7 +149,7 @@ public static IOrderedAsyncEnumerable ThenByDescendingAwait ThenByDescendingAwaitWithCancellation(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) + internal static IOrderedAsyncEnumerable ThenByDescendingAwaitWithCancellationCore(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Select.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Select.cs index b84d1edc73..b1c5822584 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Select.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Select.cs @@ -58,7 +58,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) #endif } - public static IAsyncEnumerable SelectAwait(this IAsyncEnumerable source, Func> selector) + internal static IAsyncEnumerable SelectAwaitCore(this IAsyncEnumerable source, Func> selector) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -77,7 +77,7 @@ public static IAsyncEnumerable SelectAwait(this IAsyn } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable SelectAwaitWithCancellation(this IAsyncEnumerable source, Func> selector) + internal static IAsyncEnumerable SelectAwaitWithCancellationCore(this IAsyncEnumerable source, Func> selector) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -96,7 +96,7 @@ public static IAsyncEnumerable SelectAwaitWithCancellation SelectAwait(this IAsyncEnumerable source, Func> selector) + internal static IAsyncEnumerable SelectAwaitCore(this IAsyncEnumerable source, Func> selector) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -126,7 +126,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable SelectAwaitWithCancellation(this IAsyncEnumerable source, Func> selector) + internal static IAsyncEnumerable SelectAwaitWithCancellationCore(this IAsyncEnumerable source, Func> selector) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SelectMany.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SelectMany.cs index eb209f270c..74a5a8dc39 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SelectMany.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SelectMany.cs @@ -23,7 +23,7 @@ public static IAsyncEnumerable SelectMany(this IAsync // REVIEW: Should we keep these overloads that return ValueTask>? One could argue the selector is async twice. - public static IAsyncEnumerable SelectManyAwait(this IAsyncEnumerable source, Func>> selector) + internal static IAsyncEnumerable SelectManyAwaitCore(this IAsyncEnumerable source, Func>> selector) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -34,7 +34,7 @@ public static IAsyncEnumerable SelectManyAwait(this I } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable SelectManyAwaitWithCancellation(this IAsyncEnumerable source, Func>> selector) + internal static IAsyncEnumerable SelectManyAwaitWithCancellationCore(this IAsyncEnumerable source, Func>> selector) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -79,7 +79,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) #endif } - public static IAsyncEnumerable SelectManyAwait(this IAsyncEnumerable source, Func>> selector) + internal static IAsyncEnumerable SelectManyAwaitCore(this IAsyncEnumerable source, Func>> selector) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -114,7 +114,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable SelectManyAwaitWithCancellation(this IAsyncEnumerable source, Func>> selector) + internal static IAsyncEnumerable SelectManyAwaitWithCancellationCore(this IAsyncEnumerable source, Func>> selector) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -178,7 +178,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) #endif } - public static IAsyncEnumerable SelectManyAwait(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) + internal static IAsyncEnumerable SelectManyAwaitCore(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -208,7 +208,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable SelectManyAwaitWithCancellation(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) + internal static IAsyncEnumerable SelectManyAwaitWithCancellationCore(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -274,7 +274,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) #endif } - public static IAsyncEnumerable SelectManyAwait(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) + internal static IAsyncEnumerable SelectManyAwaitCore(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -311,7 +311,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable SelectManyAwaitWithCancellation(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) + internal static IAsyncEnumerable SelectManyAwaitWithCancellationCore(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Single.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Single.cs index 609ed5885a..3babf8ec24 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Single.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Single.cs @@ -85,7 +85,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SingleAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + internal static ValueTask SingleAwaitAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -122,7 +122,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SingleAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + internal static ValueTask SingleAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SingleOrDefault.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SingleOrDefault.cs index b5ac28f153..00090c60a7 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SingleOrDefault.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SingleOrDefault.cs @@ -85,7 +85,7 @@ async ValueTask Core(IAsyncEnumerable _source, Func SingleOrDefaultAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + internal static ValueTask SingleOrDefaultAwaitAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -122,7 +122,7 @@ async ValueTask Core(IAsyncEnumerable _source, Func SingleOrDefaultAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + internal static ValueTask SingleOrDefaultAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SkipWhile.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SkipWhile.cs index 46b968a06f..93190009c9 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SkipWhile.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SkipWhile.cs @@ -92,7 +92,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) #endif } - public static IAsyncEnumerable SkipWhileAwait(this IAsyncEnumerable source, Func> predicate) + internal static IAsyncEnumerable SkipWhileAwaitCore(this IAsyncEnumerable source, Func> predicate) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -130,7 +130,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable SkipWhileAwaitWithCancellation(this IAsyncEnumerable source, Func> predicate) + internal static IAsyncEnumerable SkipWhileAwaitWithCancellationCore(this IAsyncEnumerable source, Func> predicate) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -168,7 +168,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } #endif - public static IAsyncEnumerable SkipWhileAwait(this IAsyncEnumerable source, Func> predicate) + internal static IAsyncEnumerable SkipWhileAwaitCore(this IAsyncEnumerable source, Func> predicate) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -213,7 +213,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable SkipWhileAwaitWithCancellation(this IAsyncEnumerable source, Func> predicate) + internal static IAsyncEnumerable SkipWhileAwaitWithCancellationCore(this IAsyncEnumerable source, Func> predicate) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Sum.Generated.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Sum.Generated.cs index bb0f4da0d8..8d5f917ed2 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Sum.Generated.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Sum.Generated.cs @@ -60,7 +60,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -88,7 +88,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -166,7 +166,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -194,7 +194,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -266,7 +266,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -291,7 +291,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -360,7 +360,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -385,7 +385,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -454,7 +454,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -479,7 +479,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -554,7 +554,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -582,7 +582,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -660,7 +660,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -688,7 +688,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -760,7 +760,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -785,7 +785,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -854,7 +854,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -879,7 +879,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -948,7 +948,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -973,7 +973,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + internal static ValueTask SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Sum.Generated.tt b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Sum.Generated.tt index 8233e40832..0604f6a48a 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Sum.Generated.tt +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Sum.Generated.tt @@ -111,7 +111,8 @@ else } } - public static ValueTask<<#=o.type#>> SumAwaitAsync(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) + internal static ValueTask<<#=o.type#>> SumAsyncCore(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) + { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -152,7 +153,8 @@ else } #if !NO_DEEP_CANCELLATION - public static ValueTask<<#=o.type#>> SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) + internal static ValueTask<<#=o.type#>> SumWithCancellationAsyncCore(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) + { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/TakeWhile.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/TakeWhile.cs index 9ddd1a2c31..cb31144c20 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/TakeWhile.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/TakeWhile.cs @@ -72,7 +72,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) #endif } - public static IAsyncEnumerable TakeWhileAwait(this IAsyncEnumerable source, Func> predicate) + internal static IAsyncEnumerable TakeWhileAwaitCore(this IAsyncEnumerable source, Func> predicate) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -100,7 +100,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable TakeWhileAwaitWithCancellation(this IAsyncEnumerable source, Func> predicate) + internal static IAsyncEnumerable TakeWhileAwaitWithCancellationCore(this IAsyncEnumerable source, Func> predicate) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -128,7 +128,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } #endif - public static IAsyncEnumerable TakeWhileAwait(this IAsyncEnumerable source, Func> predicate) + internal static IAsyncEnumerable TakeWhileAwaitCore(this IAsyncEnumerable source, Func> predicate) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -163,7 +163,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable TakeWhileAwaitWithCancellation(this IAsyncEnumerable source, Func> predicate) + internal static IAsyncEnumerable TakeWhileAwaitWithCancellationCore(this IAsyncEnumerable source, Func> predicate) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToDictionary.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToDictionary.cs index f91dc4fea1..8e5bdb2a91 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToDictionary.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToDictionary.cs @@ -37,10 +37,10 @@ static async ValueTask> Core(IAsyncEnumerable } } - public static ValueTask> ToDictionaryAwaitAsync(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken = default) => - ToDictionaryAwaitAsync(source, keySelector, comparer: null, cancellationToken); + internal static ValueTask> ToDictionaryAwaitAsyncCore(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken = default) => + ToDictionaryAwaitAsyncCore(source, keySelector, comparer: null, cancellationToken); - public static ValueTask> ToDictionaryAwaitAsync(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + internal static ValueTask> ToDictionaryAwaitAsyncCore(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -65,10 +65,10 @@ static async ValueTask> Core(IAsyncEnumerable } #if !NO_DEEP_CANCELLATION - public static ValueTask> ToDictionaryAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken = default) => - ToDictionaryAwaitWithCancellationAsync(source, keySelector, comparer: null, cancellationToken); + internal static ValueTask> ToDictionaryAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken = default) => + ToDictionaryAwaitWithCancellationAsyncCore(source, keySelector, comparer: null, cancellationToken); - public static ValueTask> ToDictionaryAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + internal static ValueTask> ToDictionaryAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -123,10 +123,10 @@ static async ValueTask> Core(IAsyncEnumerable> ToDictionaryAwaitAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken = default) => - ToDictionaryAwaitAsync(source, keySelector, elementSelector, comparer: null, cancellationToken); + internal static ValueTask> ToDictionaryAwaitAsyncCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken = default) => + ToDictionaryAwaitAsyncCore(source, keySelector, elementSelector, comparer: null, cancellationToken); - public static ValueTask> ToDictionaryAwaitAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + internal static ValueTask> ToDictionaryAwaitAsyncCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -154,10 +154,10 @@ static async ValueTask> Core(IAsyncEnumerable> ToDictionaryAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken = default) => - ToDictionaryAwaitWithCancellationAsync(source, keySelector, elementSelector, comparer: null, cancellationToken); + internal static ValueTask> ToDictionaryAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken = default) => + ToDictionaryAwaitWithCancellationAsyncCore(source, keySelector, elementSelector, comparer: null, cancellationToken); - public static ValueTask> ToDictionaryAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + internal static ValueTask> ToDictionaryAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToLookup.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToLookup.cs index eaa65d9690..681252dc5a 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToLookup.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToLookup.cs @@ -28,10 +28,10 @@ static async ValueTask> Core(IAsyncEnumerable _s } } - public static ValueTask> ToLookupAwaitAsync(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken = default) => - ToLookupAwaitAsync(source, keySelector, comparer:null, cancellationToken); + internal static ValueTask> ToLookupAwaitAsyncCore(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken = default) => + ToLookupAwaitAsyncCore(source, keySelector, comparer:null, cancellationToken); - public static ValueTask> ToLookupAwaitAsync(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + internal static ValueTask> ToLookupAwaitAsyncCore(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -47,10 +47,10 @@ async ValueTask> Core(IAsyncEnumerable _source, } #if !NO_DEEP_CANCELLATION - public static ValueTask> ToLookupAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken = default) => - ToLookupAwaitWithCancellationAsync(source, keySelector, comparer: null, cancellationToken); + internal static ValueTask> ToLookupAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken = default) => + ToLookupAwaitWithCancellationAsyncCore(source, keySelector, comparer: null, cancellationToken); - public static ValueTask> ToLookupAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + internal static ValueTask> ToLookupAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -86,10 +86,10 @@ static async ValueTask> Core(IAsyncEnumerable _ } } - public static ValueTask> ToLookupAwaitAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken = default) => - ToLookupAwaitAsync(source, keySelector, elementSelector, comparer: null, cancellationToken); + internal static ValueTask> ToLookupAwaitAsyncCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken = default) => + ToLookupAwaitAsyncCore(source, keySelector, elementSelector, comparer: null, cancellationToken); - public static ValueTask> ToLookupAwaitAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + internal static ValueTask> ToLookupAwaitAsyncCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -107,10 +107,10 @@ static async ValueTask> Core(IAsyncEnumerable _ } #if !NO_DEEP_CANCELLATION - public static ValueTask> ToLookupAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken = default) => - ToLookupAwaitWithCancellationAsync(source, keySelector, elementSelector, comparer: null, cancellationToken); + internal static ValueTask> ToLookupAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken = default) => + ToLookupAwaitWithCancellationAsyncCore(source, keySelector, elementSelector, comparer: null, cancellationToken); - public static ValueTask> ToLookupAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + internal static ValueTask> ToLookupAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Where.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Where.cs index 2c307bd2d3..f329431be9 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Where.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Where.cs @@ -59,7 +59,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) #endif } - public static IAsyncEnumerable WhereAwait(this IAsyncEnumerable source, Func> predicate) + internal static IAsyncEnumerable WhereAwaitCore(this IAsyncEnumerable source, Func> predicate) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -76,7 +76,7 @@ public static IAsyncEnumerable WhereAwait(this IAsyncEnumerabl } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable WhereAwaitWithCancellation(this IAsyncEnumerable source, Func> predicate) + internal static IAsyncEnumerable WhereAwaitWithCancellationCore(this IAsyncEnumerable source, Func> predicate) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -93,7 +93,7 @@ public static IAsyncEnumerable WhereAwaitWithCancellation(this } #endif - public static IAsyncEnumerable WhereAwait(this IAsyncEnumerable source, Func> predicate) + internal static IAsyncEnumerable WhereAwaitCore(this IAsyncEnumerable source, Func> predicate) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -126,7 +126,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable WhereAwaitWithCancellation(this IAsyncEnumerable source, Func> predicate) + internal static IAsyncEnumerable WhereAwaitWithCancellationCore(this IAsyncEnumerable source, Func> predicate) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Zip.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Zip.cs index cef5bf0947..182ebae643 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Zip.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Zip.cs @@ -71,7 +71,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) #endif } - public static IAsyncEnumerable ZipAwait(this IAsyncEnumerable first, IAsyncEnumerable second, Func> selector) + internal static IAsyncEnumerable ZipAwaitCore(this IAsyncEnumerable first, IAsyncEnumerable second, Func> selector) { if (first == null) throw Error.ArgumentNull(nameof(first)); @@ -102,7 +102,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable ZipAwaitWithCancellation(this IAsyncEnumerable first, IAsyncEnumerable second, Func> selector) + internal static IAsyncEnumerable ZipAwaitWithCancellationCore(this IAsyncEnumerable first, IAsyncEnumerable second, Func> selector) { if (first == null) throw Error.ArgumentNull(nameof(first));