<PackageReference Include="System.Linq.AsyncEnumerable" Version="11.0.0-preview.3.26207.106" />

System.Linq.AsyncEnumerable

public static class AsyncEnumerable
Provides a set of static methods for querying objects that implement IAsyncEnumerable<T>.
namespace System.Linq { public static class AsyncEnumerable { public static ValueTask<TSource> AggregateAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, TSource, TSource> func, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> AggregateAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, TSource, CancellationToken, ValueTask<TSource>> func, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TAccumulate> AggregateAsync<[Nullable(2)] TSource, [Nullable(2)] TAccumulate>(this IAsyncEnumerable<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> func, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TAccumulate> AggregateAsync<[Nullable(2)] TSource, [Nullable(2)] TAccumulate>(this IAsyncEnumerable<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, CancellationToken, ValueTask<TAccumulate>> func, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TResult> AggregateAsync<[Nullable(2)] TSource, [Nullable(2)] TAccumulate, [Nullable(2)] TResult>(this IAsyncEnumerable<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> func, Func<TAccumulate, TResult> resultSelector, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TResult> AggregateAsync<TSource, TAccumulate, TResult>(this IAsyncEnumerable<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, CancellationToken, ValueTask<TAccumulate>> func, Func<TAccumulate, CancellationToken, ValueTask<TResult>> resultSelector, CancellationToken cancellationToken = default(CancellationToken)); public static IAsyncEnumerable<KeyValuePair<TKey, TAccumulate>> AggregateBy<[Nullable(2)] TSource, TKey, [Nullable(2)] TAccumulate>(this IAsyncEnumerable<TSource> source, Func<TSource, TKey> keySelector, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> func, IEqualityComparer<TKey> keyComparer = null); public static IAsyncEnumerable<KeyValuePair<TKey, TAccumulate>> AggregateBy<[Nullable(2)] TSource, TKey, [Nullable(2)] TAccumulate>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, TAccumulate seed, Func<TAccumulate, TSource, CancellationToken, ValueTask<TAccumulate>> func, IEqualityComparer<TKey> keyComparer = null); public static IAsyncEnumerable<KeyValuePair<TKey, TAccumulate>> AggregateBy<[Nullable(2)] TSource, TKey, [Nullable(2)] TAccumulate>(this IAsyncEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TKey, TAccumulate> seedSelector, Func<TAccumulate, TSource, TAccumulate> func, IEqualityComparer<TKey> keyComparer = null); public static IAsyncEnumerable<KeyValuePair<TKey, TAccumulate>> AggregateBy<[Nullable(2)] TSource, TKey, [Nullable(2)] TAccumulate>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, Func<TKey, CancellationToken, ValueTask<TAccumulate>> seedSelector, Func<TAccumulate, TSource, CancellationToken, ValueTask<TAccumulate>> func, IEqualityComparer<TKey> keyComparer = null); public static ValueTask<bool> AllAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, bool> predicate, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<bool> AllAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<bool>> predicate, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<bool> AnyAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<bool> AnyAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, bool> predicate, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<bool> AnyAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<bool>> predicate, CancellationToken cancellationToken = default(CancellationToken)); public static IAsyncEnumerable<TSource> Append<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, TSource element); public static ValueTask<double> AverageAsync(this IAsyncEnumerable<int> source, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<double> AverageAsync(this IAsyncEnumerable<long> source, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<float> AverageAsync(this IAsyncEnumerable<float> source, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<double> AverageAsync(this IAsyncEnumerable<double> source, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<decimal> AverageAsync(this IAsyncEnumerable<decimal> source, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<double?> AverageAsync(this IAsyncEnumerable<int?> source, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<double?> AverageAsync(this IAsyncEnumerable<long?> source, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<float?> AverageAsync(this IAsyncEnumerable<float?> source, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<double?> AverageAsync(this IAsyncEnumerable<double?> source, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<decimal?> AverageAsync(this IAsyncEnumerable<decimal?> source, CancellationToken cancellationToken = default(CancellationToken)); public static IAsyncEnumerable<TResult> Cast<[Nullable(2)] TResult>(this IAsyncEnumerable<object> source); public static IAsyncEnumerable<TSource[]> Chunk<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, int size); public static IAsyncEnumerable<TSource> Concat<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> first, IAsyncEnumerable<TSource> second); public static ValueTask<bool> ContainsAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, TSource value, IEqualityComparer<TSource> comparer = null, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<int> CountAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<int> CountAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, bool> predicate, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<int> CountAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<bool>> predicate, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<long> LongCountAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<long> LongCountAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, bool> predicate, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<long> LongCountAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<bool>> predicate, CancellationToken cancellationToken = default(CancellationToken)); public static IAsyncEnumerable<KeyValuePair<TKey, int>> CountBy<[Nullable(2)] TSource, TKey>(this IAsyncEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> keyComparer = null); public static IAsyncEnumerable<KeyValuePair<TKey, int>> CountBy<[Nullable(2)] TSource, TKey>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, IEqualityComparer<TKey> keyComparer = null); public static IAsyncEnumerable<TSource> DefaultIfEmpty<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source); public static IAsyncEnumerable<TSource> DefaultIfEmpty<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, TSource defaultValue); public static IAsyncEnumerable<TSource> Distinct<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, IEqualityComparer<TSource> comparer = null); public static IAsyncEnumerable<TSource> DistinctBy<[Nullable(2)] TSource, [Nullable(2)] TKey>(this IAsyncEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer = null); public static IAsyncEnumerable<TSource> DistinctBy<[Nullable(2)] TSource, [Nullable(2)] TKey>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, IEqualityComparer<TKey> comparer = null); public static ValueTask<TSource> ElementAtAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, int index, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> ElementAtOrDefaultAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, int index, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> ElementAtAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Index index, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> ElementAtOrDefaultAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Index index, CancellationToken cancellationToken = default(CancellationToken)); public static IAsyncEnumerable<TResult> Empty<[Nullable(2)] TResult>(); public static IAsyncEnumerable<TSource> Except<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> first, IAsyncEnumerable<TSource> second, IEqualityComparer<TSource> comparer = null); public static IAsyncEnumerable<TSource> ExceptBy<[Nullable(2)] TSource, [Nullable(2)] TKey>(this IAsyncEnumerable<TSource> first, IAsyncEnumerable<TKey> second, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer = null); public static IAsyncEnumerable<TSource> ExceptBy<[Nullable(2)] TSource, [Nullable(2)] TKey>(this IAsyncEnumerable<TSource> first, IAsyncEnumerable<TKey> second, Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, IEqualityComparer<TKey> comparer = null); public static ValueTask<TSource> FirstAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> FirstAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, bool> predicate, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> FirstAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<bool>> predicate, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> FirstOrDefaultAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> FirstOrDefaultAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, TSource defaultValue, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> FirstOrDefaultAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, bool> predicate, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> FirstOrDefaultAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<bool>> predicate, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> FirstOrDefaultAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, bool> predicate, TSource defaultValue, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> FirstOrDefaultAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<bool>> predicate, TSource defaultValue, CancellationToken cancellationToken = default(CancellationToken)); public static IAsyncEnumerable<IGrouping<TKey, TSource>> GroupBy<[Nullable(2)] TSource, [Nullable(2)] TKey>(this IAsyncEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer = null); public static IAsyncEnumerable<IGrouping<TKey, TSource>> GroupBy<[Nullable(2)] TSource, [Nullable(2)] TKey>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, IEqualityComparer<TKey> comparer = null); public static IAsyncEnumerable<IGrouping<TKey, TElement>> GroupBy<[Nullable(2)] TSource, [Nullable(2)] TKey, [Nullable(2)] TElement>(this IAsyncEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey> comparer = null); public static IAsyncEnumerable<IGrouping<TKey, TElement>> GroupBy<TSource, TKey, TElement>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, Func<TSource, CancellationToken, ValueTask<TElement>> elementSelector, IEqualityComparer<TKey> comparer = null); public static IAsyncEnumerable<TResult> GroupBy<[Nullable(2)] TSource, [Nullable(2)] TKey, [Nullable(2)] TResult>(this IAsyncEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TKey, IEnumerable<TSource>, TResult> resultSelector, IEqualityComparer<TKey> comparer = null); public static IAsyncEnumerable<TResult> GroupBy<TSource, TKey, TResult>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, Func<TKey, IEnumerable<TSource>, CancellationToken, ValueTask<TResult>> resultSelector, IEqualityComparer<TKey> comparer = null); public static IAsyncEnumerable<TResult> GroupBy<[Nullable(2)] TSource, [Nullable(2)] TKey, [Nullable(2)] TElement, [Nullable(2)] TResult>(this IAsyncEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, Func<TKey, IEnumerable<TElement>, TResult> resultSelector, IEqualityComparer<TKey> comparer = null); public static IAsyncEnumerable<TResult> GroupBy<TSource, TKey, TElement, TResult>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, Func<TSource, CancellationToken, ValueTask<TElement>> elementSelector, Func<TKey, IEnumerable<TElement>, CancellationToken, ValueTask<TResult>> resultSelector, IEqualityComparer<TKey> comparer = null); public static IAsyncEnumerable<TResult> GroupJoin<[Nullable(2)] TOuter, [Nullable(2)] TInner, [Nullable(2)] TKey, [Nullable(2)] TResult>(this IAsyncEnumerable<TOuter> outer, IAsyncEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, IEnumerable<TInner>, TResult> resultSelector, IEqualityComparer<TKey> comparer = null); public static IAsyncEnumerable<TResult> GroupJoin<TOuter, TInner, TKey, TResult>(this IAsyncEnumerable<TOuter> outer, IAsyncEnumerable<TInner> inner, Func<TOuter, CancellationToken, ValueTask<TKey>> outerKeySelector, Func<TInner, CancellationToken, ValueTask<TKey>> innerKeySelector, Func<TOuter, IEnumerable<TInner>, CancellationToken, ValueTask<TResult>> resultSelector, IEqualityComparer<TKey> comparer = null); public static IAsyncEnumerable<(int Index, TSource Item)> Index<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source); public static IAsyncEnumerable<TSource> Intersect<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> first, IAsyncEnumerable<TSource> second, IEqualityComparer<TSource> comparer = null); public static IAsyncEnumerable<TSource> IntersectBy<[Nullable(2)] TSource, [Nullable(2)] TKey>(this IAsyncEnumerable<TSource> first, IAsyncEnumerable<TKey> second, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer = null); public static IAsyncEnumerable<TSource> IntersectBy<[Nullable(2)] TSource, [Nullable(2)] TKey>(this IAsyncEnumerable<TSource> first, IAsyncEnumerable<TKey> second, Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, IEqualityComparer<TKey> comparer = null); public static IAsyncEnumerable<TResult> Join<[Nullable(2)] TOuter, [Nullable(2)] TInner, [Nullable(2)] TKey, [Nullable(2)] TResult>(this IAsyncEnumerable<TOuter> outer, IAsyncEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, TInner, TResult> resultSelector, IEqualityComparer<TKey> comparer = null); public static IAsyncEnumerable<TResult> Join<TOuter, TInner, TKey, TResult>(this IAsyncEnumerable<TOuter> outer, IAsyncEnumerable<TInner> inner, Func<TOuter, CancellationToken, ValueTask<TKey>> outerKeySelector, Func<TInner, CancellationToken, ValueTask<TKey>> innerKeySelector, Func<TOuter, TInner, CancellationToken, ValueTask<TResult>> resultSelector, IEqualityComparer<TKey> comparer = null); public static ValueTask<TSource> LastAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> LastAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, bool> predicate, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> LastAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<bool>> predicate, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> LastOrDefaultAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> LastOrDefaultAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, TSource defaultValue, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> LastOrDefaultAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, bool> predicate, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> LastOrDefaultAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<bool>> predicate, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> LastOrDefaultAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, bool> predicate, TSource defaultValue, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> LastOrDefaultAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<bool>> predicate, TSource defaultValue, CancellationToken cancellationToken = default(CancellationToken)); public static IAsyncEnumerable<TResult> LeftJoin<[Nullable(2)] TOuter, [Nullable(2)] TInner, [Nullable(2)] TKey, [Nullable(2)] TResult>(this IAsyncEnumerable<TOuter> outer, IAsyncEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, TInner, TResult> resultSelector, IEqualityComparer<TKey> comparer = null); public static IAsyncEnumerable<TResult> LeftJoin<TOuter, TInner, TKey, TResult>(this IAsyncEnumerable<TOuter> outer, IAsyncEnumerable<TInner> inner, Func<TOuter, CancellationToken, ValueTask<TKey>> outerKeySelector, Func<TInner, CancellationToken, ValueTask<TKey>> innerKeySelector, Func<TOuter, TInner, CancellationToken, ValueTask<TResult>> resultSelector, IEqualityComparer<TKey> comparer = null); public static ValueTask<TSource> MaxAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, IComparer<TSource> comparer = null, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> MaxByAsync<[Nullable(2)] TSource, [Nullable(2)] TKey>(this IAsyncEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey> comparer = null, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> MaxByAsync<TSource, TKey>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, IComparer<TKey> comparer = null, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> MinAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, IComparer<TSource> comparer = null, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> MinByAsync<[Nullable(2)] TSource, [Nullable(2)] TKey>(this IAsyncEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey> comparer = null, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> MinByAsync<TSource, TKey>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, IComparer<TKey> comparer = null, CancellationToken cancellationToken = default(CancellationToken)); public static IAsyncEnumerable<TResult> OfType<[Nullable(2)] TResult>(this IAsyncEnumerable<object> source); public static IOrderedAsyncEnumerable<T> Order<[Nullable(2)] T>(this IAsyncEnumerable<T> source, IComparer<T> comparer = null); public static IOrderedAsyncEnumerable<TSource> OrderBy<[Nullable(2)] TSource, [Nullable(2)] TKey>(this IAsyncEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey> comparer = null); public static IOrderedAsyncEnumerable<TSource> OrderBy<[Nullable(2)] TSource, [Nullable(2)] TKey>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, IComparer<TKey> comparer = null); public static IOrderedAsyncEnumerable<T> OrderDescending<[Nullable(2)] T>(this IAsyncEnumerable<T> source, IComparer<T> comparer = null); public static IOrderedAsyncEnumerable<TSource> OrderByDescending<[Nullable(2)] TSource, [Nullable(2)] TKey>(this IAsyncEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey> comparer = null); public static IOrderedAsyncEnumerable<TSource> OrderByDescending<[Nullable(2)] TSource, [Nullable(2)] TKey>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, IComparer<TKey> comparer = null); public static IOrderedAsyncEnumerable<TSource> ThenBy<[Nullable(2)] TSource, [Nullable(2)] TKey>(this IOrderedAsyncEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey> comparer = null); public static IOrderedAsyncEnumerable<TSource> ThenBy<[Nullable(2)] TSource, [Nullable(2)] TKey>(this IOrderedAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, IComparer<TKey> comparer = null); public static IOrderedAsyncEnumerable<TSource> ThenByDescending<[Nullable(2)] TSource, [Nullable(2)] TKey>(this IOrderedAsyncEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey> comparer = null); public static IOrderedAsyncEnumerable<TSource> ThenByDescending<[Nullable(2)] TSource, [Nullable(2)] TKey>(this IOrderedAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, IComparer<TKey> comparer = null); public static IAsyncEnumerable<TSource> Prepend<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, TSource element); public static IAsyncEnumerable<int> Range(int start, int count); public static IAsyncEnumerable<TResult> Repeat<[Nullable(2)] TResult>(TResult element, int count); public static IAsyncEnumerable<TSource> Reverse<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source); public static IAsyncEnumerable<TResult> RightJoin<[Nullable(2)] TOuter, [Nullable(2)] TInner, [Nullable(2)] TKey, [Nullable(2)] TResult>(this IAsyncEnumerable<TOuter> outer, IAsyncEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, TInner, TResult> resultSelector, IEqualityComparer<TKey> comparer = null); public static IAsyncEnumerable<TResult> RightJoin<TOuter, TInner, TKey, TResult>(this IAsyncEnumerable<TOuter> outer, IAsyncEnumerable<TInner> inner, Func<TOuter, CancellationToken, ValueTask<TKey>> outerKeySelector, Func<TInner, CancellationToken, ValueTask<TKey>> innerKeySelector, Func<TOuter, TInner, CancellationToken, ValueTask<TResult>> resultSelector, IEqualityComparer<TKey> comparer = null); public static IAsyncEnumerable<TResult> Select<[Nullable(2)] TSource, [Nullable(2)] TResult>(this IAsyncEnumerable<TSource> source, Func<TSource, TResult> selector); public static IAsyncEnumerable<TResult> Select<[Nullable(2)] TSource, [Nullable(2)] TResult>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<TResult>> selector); public static IAsyncEnumerable<TResult> Select<[Nullable(2)] TSource, [Nullable(2)] TResult>(this IAsyncEnumerable<TSource> source, Func<TSource, int, TResult> selector); public static IAsyncEnumerable<TResult> Select<[Nullable(2)] TSource, [Nullable(2)] TResult>(this IAsyncEnumerable<TSource> source, Func<TSource, int, CancellationToken, ValueTask<TResult>> selector); public static IAsyncEnumerable<TResult> SelectMany<[Nullable(2)] TSource, [Nullable(2)] TResult>(this IAsyncEnumerable<TSource> source, Func<TSource, IEnumerable<TResult>> selector); public static IAsyncEnumerable<TResult> SelectMany<[Nullable(2)] TSource, [Nullable(2)] TResult>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<IEnumerable<TResult>>> selector); public static IAsyncEnumerable<TResult> SelectMany<[Nullable(2)] TSource, [Nullable(2)] TResult>(this IAsyncEnumerable<TSource> source, Func<TSource, IAsyncEnumerable<TResult>> selector); public static IAsyncEnumerable<TResult> SelectMany<[Nullable(2)] TSource, [Nullable(2)] TResult>(this IAsyncEnumerable<TSource> source, Func<TSource, int, IEnumerable<TResult>> selector); public static IAsyncEnumerable<TResult> SelectMany<[Nullable(2)] TSource, [Nullable(2)] TResult>(this IAsyncEnumerable<TSource> source, Func<TSource, int, CancellationToken, ValueTask<IEnumerable<TResult>>> selector); public static IAsyncEnumerable<TResult> SelectMany<[Nullable(2)] TSource, [Nullable(2)] TResult>(this IAsyncEnumerable<TSource> source, Func<TSource, int, IAsyncEnumerable<TResult>> selector); public static IAsyncEnumerable<TResult> SelectMany<[Nullable(2)] TSource, [Nullable(2)] TCollection, [Nullable(2)] TResult>(this IAsyncEnumerable<TSource> source, Func<TSource, IEnumerable<TCollection>> collectionSelector, Func<TSource, TCollection, TResult> resultSelector); public static IAsyncEnumerable<TResult> SelectMany<TSource, TCollection, TResult>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<IEnumerable<TCollection>>> collectionSelector, Func<TSource, TCollection, CancellationToken, ValueTask<TResult>> resultSelector); public static IAsyncEnumerable<TResult> SelectMany<[Nullable(2)] TSource, [Nullable(2)] TCollection, [Nullable(2)] TResult>(this IAsyncEnumerable<TSource> source, Func<TSource, IAsyncEnumerable<TCollection>> collectionSelector, Func<TSource, TCollection, TResult> resultSelector); public static IAsyncEnumerable<TResult> SelectMany<[Nullable(2)] TSource, [Nullable(2)] TCollection, [Nullable(2)] TResult>(this IAsyncEnumerable<TSource> source, Func<TSource, IAsyncEnumerable<TCollection>> collectionSelector, Func<TSource, TCollection, CancellationToken, ValueTask<TResult>> resultSelector); public static IAsyncEnumerable<TResult> SelectMany<[Nullable(2)] TSource, [Nullable(2)] TCollection, [Nullable(2)] TResult>(this IAsyncEnumerable<TSource> source, Func<TSource, int, IEnumerable<TCollection>> collectionSelector, Func<TSource, TCollection, TResult> resultSelector); public static IAsyncEnumerable<TResult> SelectMany<TSource, TCollection, TResult>(this IAsyncEnumerable<TSource> source, Func<TSource, int, CancellationToken, ValueTask<IEnumerable<TCollection>>> collectionSelector, Func<TSource, TCollection, CancellationToken, ValueTask<TResult>> resultSelector); public static IAsyncEnumerable<TResult> SelectMany<[Nullable(2)] TSource, [Nullable(2)] TCollection, [Nullable(2)] TResult>(this IAsyncEnumerable<TSource> source, Func<TSource, int, IAsyncEnumerable<TCollection>> collectionSelector, Func<TSource, TCollection, CancellationToken, ValueTask<TResult>> resultSelector); public static ValueTask<bool> SequenceEqualAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> first, IAsyncEnumerable<TSource> second, IEqualityComparer<TSource> comparer = null, CancellationToken cancellationToken = default(CancellationToken)); public static IAsyncEnumerable<TSource> Shuffle<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source); public static ValueTask<TSource> SingleAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> SingleAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, bool> predicate, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> SingleAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<bool>> predicate, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> SingleOrDefaultAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> SingleOrDefaultAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, TSource defaultValue, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> SingleOrDefaultAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, bool> predicate, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> SingleOrDefaultAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<bool>> predicate, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> SingleOrDefaultAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, bool> predicate, TSource defaultValue, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<TSource> SingleOrDefaultAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<bool>> predicate, TSource defaultValue, CancellationToken cancellationToken = default(CancellationToken)); public static IAsyncEnumerable<TSource> Skip<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, int count); public static IAsyncEnumerable<TSource> SkipLast<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, int count); public static IAsyncEnumerable<TSource> SkipWhile<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, bool> predicate); public static IAsyncEnumerable<TSource> SkipWhile<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<bool>> predicate); public static IAsyncEnumerable<TSource> SkipWhile<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, int, bool> predicate); public static IAsyncEnumerable<TSource> SkipWhile<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, int, CancellationToken, ValueTask<bool>> predicate); public static ValueTask<int> SumAsync(this IAsyncEnumerable<int> source, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<long> SumAsync(this IAsyncEnumerable<long> source, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<float> SumAsync(this IAsyncEnumerable<float> source, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<double> SumAsync(this IAsyncEnumerable<double> source, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<decimal> SumAsync(this IAsyncEnumerable<decimal> source, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<int?> SumAsync(this IAsyncEnumerable<int?> source, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<long?> SumAsync(this IAsyncEnumerable<long?> source, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<float?> SumAsync(this IAsyncEnumerable<float?> source, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<double?> SumAsync(this IAsyncEnumerable<double?> source, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<decimal?> SumAsync(this IAsyncEnumerable<decimal?> source, CancellationToken cancellationToken = default(CancellationToken)); public static IAsyncEnumerable<TSource> Take<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, int count); public static IAsyncEnumerable<TSource> Take<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Range range); public static IAsyncEnumerable<TSource> TakeLast<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, int count); public static IAsyncEnumerable<TSource> TakeWhile<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, bool> predicate); public static IAsyncEnumerable<TSource> TakeWhile<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<bool>> predicate); public static IAsyncEnumerable<TSource> TakeWhile<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, int, bool> predicate); public static IAsyncEnumerable<TSource> TakeWhile<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, int, CancellationToken, ValueTask<bool>> predicate); public static ValueTask<TSource[]> ToArrayAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, CancellationToken cancellationToken = default(CancellationToken)); public static IAsyncEnumerable<TSource> ToAsyncEnumerable<[Nullable(2)] TSource>(this IEnumerable<TSource> source); public static ValueTask<Dictionary<TKey, TValue>> ToDictionaryAsync<TKey, [Nullable(2)] TValue>(this IAsyncEnumerable<KeyValuePair<TKey, TValue>> source, IEqualityComparer<TKey> comparer = null, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<Dictionary<TKey, TValue>> ToDictionaryAsync<TKey, [Nullable(2)] TValue>(this IAsyncEnumerable<(TKey Key, TValue Value)> source, IEqualityComparer<TKey> comparer = null, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<Dictionary<TKey, TSource>> ToDictionaryAsync<[Nullable(2)] TSource, TKey>(this IAsyncEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer = null, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<Dictionary<TKey, TSource>> ToDictionaryAsync<[Nullable(2)] TSource, TKey>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, IEqualityComparer<TKey> comparer = null, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<Dictionary<TKey, TElement>> ToDictionaryAsync<[Nullable(2)] TSource, TKey, [Nullable(2)] TElement>(this IAsyncEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey> comparer = null, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<Dictionary<TKey, TElement>> ToDictionaryAsync<[Nullable(2)] TSource, TKey, [Nullable(2)] TElement>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, Func<TSource, CancellationToken, ValueTask<TElement>> elementSelector, IEqualityComparer<TKey> comparer = null, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<HashSet<TSource>> ToHashSetAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, IEqualityComparer<TSource> comparer = null, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<List<TSource>> ToListAsync<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<ILookup<TKey, TSource>> ToLookupAsync<[Nullable(2)] TSource, [Nullable(2)] TKey>(this IAsyncEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer = null, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<ILookup<TKey, TSource>> ToLookupAsync<TSource, TKey>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, IEqualityComparer<TKey> comparer = null, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<ILookup<TKey, TElement>> ToLookupAsync<[Nullable(2)] TSource, [Nullable(2)] TKey, [Nullable(2)] TElement>(this IAsyncEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey> comparer = null, CancellationToken cancellationToken = default(CancellationToken)); public static ValueTask<ILookup<TKey, TElement>> ToLookupAsync<TSource, TKey, TElement>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, Func<TSource, CancellationToken, ValueTask<TElement>> elementSelector, IEqualityComparer<TKey> comparer = null, CancellationToken cancellationToken = default(CancellationToken)); public static IAsyncEnumerable<TSource> Union<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> first, IAsyncEnumerable<TSource> second, IEqualityComparer<TSource> comparer = null); public static IAsyncEnumerable<TSource> UnionBy<[Nullable(2)] TSource, [Nullable(2)] TKey>(this IAsyncEnumerable<TSource> first, IAsyncEnumerable<TSource> second, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer = null); public static IAsyncEnumerable<TSource> UnionBy<[Nullable(2)] TSource, [Nullable(2)] TKey>(this IAsyncEnumerable<TSource> first, IAsyncEnumerable<TSource> second, Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, IEqualityComparer<TKey> comparer = null); public static IAsyncEnumerable<TSource> Where<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, bool> predicate); public static IAsyncEnumerable<TSource> Where<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<bool>> predicate); public static IAsyncEnumerable<TSource> Where<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, int, bool> predicate); public static IAsyncEnumerable<TSource> Where<[Nullable(2)] TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, int, CancellationToken, ValueTask<bool>> predicate); public static IAsyncEnumerable<TResult> Zip<[Nullable(2)] TFirst, [Nullable(2)] TSecond, [Nullable(2)] TResult>(this IAsyncEnumerable<TFirst> first, IAsyncEnumerable<TSecond> second, Func<TFirst, TSecond, TResult> resultSelector); public static IAsyncEnumerable<TResult> Zip<[Nullable(2)] TFirst, [Nullable(2)] TSecond, [Nullable(2)] TResult>(this IAsyncEnumerable<TFirst> first, IAsyncEnumerable<TSecond> second, Func<TFirst, TSecond, CancellationToken, ValueTask<TResult>> resultSelector); public static IAsyncEnumerable<(TFirst First, TSecond Second)> Zip<[Nullable(2)] TFirst, [Nullable(2)] TSecond>(this IAsyncEnumerable<TFirst> first, IAsyncEnumerable<TSecond> second); public static IAsyncEnumerable<(TFirst First, TSecond Second, TThird Third)> Zip<[Nullable(2)] TFirst, [Nullable(2)] TSecond, [Nullable(2)] TThird>(this IAsyncEnumerable<TFirst> first, IAsyncEnumerable<TSecond> second, IAsyncEnumerable<TThird> third); public static IAsyncEnumerable<T> InfiniteSequence<[Nullable(0)] T>(T start, T step) where T : IAdditionOperators<T, T, T>; public static IAsyncEnumerable<T> Sequence<[Nullable(0)] T>(T start, T endInclusive, T step) where T : INumber<T>; } }