From 0737e95558e2ddd72bbf88f018d7cd8bdb050f59 Mon Sep 17 00:00:00 2001 From: Ian Griffiths Date: Mon, 29 Sep 2025 10:56:12 +0100 Subject: [PATCH 01/10] Update to .NET 10.0, add System.Linq.AsyncEnumerable refs The main job at this stage was to ensure it can still compile. This starts the job of separating out the duplicated and different APIs, but most of that remains to be done. --- .../adr/0002-System-Linq-Async-In-Net10.md | 44 ++++++++++++++++ Ix.NET/Source/ApiCompare/ApiCompare.csproj | 14 +++++ .../Benchmarks.System.Interactive.csproj | 2 +- Ix.NET/Source/FasterLinq/FasterLinq.csproj | 2 +- Ix.NET/Source/Playground/Playground.csproj | 18 +++++++ ...m.Interactive.Async.Providers.Tests.csproj | 21 +++++++- .../System.Interactive.Async.Providers.csproj | 2 +- .../System.Interactive.Async.Tests.csproj | 21 +++++++- .../System.Interactive.Async.csproj | 8 +-- .../System/Linq/IAsyncIListProvider.cs | 52 +++++++++++++++++++ .../System/Linq/Operators/Scan.cs | 12 ++--- .../System.Linq.Async.Queryable.Tests.csproj | 21 +++++++- .../System.Linq.Async.Queryable.csproj | 16 +++++- .../System.Linq.Async.Tests.csproj | 21 +++++++- .../System.Linq.Async.csproj | 33 ++++++++++-- .../System/Linq/AsyncEnumerablePartition.cs | 2 + .../System/Linq/AsyncIterator.Opt.cs | 2 + .../System/Linq/AsyncListPartition.cs | 2 + .../System/Linq/IAsyncGrouping.cs | 1 + .../System/Linq/IAsyncIListProvider.cs | 9 ++++ .../System/Linq/IOrderedAsyncEnumerable.cs | 2 + .../System/Linq/Operators/Aggregate.cs | 29 +++++++++++ .../System/Linq/Operators/Grouping.cs | 2 + .../System/Linq/Operators/Lookup.cs | 2 + .../Linq/Operators/OrderedAsyncEnumerable.cs | 2 + ...sts.System.Interactive.ApiApprovals.csproj | 13 +++++ .../System.Linq.Async.csproj | 4 +- 27 files changed, 334 insertions(+), 23 deletions(-) create mode 100644 Ix.NET/Documentation/adr/0002-System-Linq-Async-In-Net10.md create mode 100644 Ix.NET/Source/System.Interactive.Async/System/Linq/IAsyncIListProvider.cs diff --git a/Ix.NET/Documentation/adr/0002-System-Linq-Async-In-Net10.md b/Ix.NET/Documentation/adr/0002-System-Linq-Async-In-Net10.md new file mode 100644 index 000000000..aae4be861 --- /dev/null +++ b/Ix.NET/Documentation/adr/0002-System-Linq-Async-In-Net10.md @@ -0,0 +1,44 @@ +# Migration of core `IAsyncEnumerable` LINQ to runtime libraries + +.NET 10.0 provides LINQ support for `IAsyncEnumerable` in the runtime class libraries. This effectively renders most of `System.Linq.Async` irrelevant. However, enabling a smooth transition to .NET 10.0 for existing users of this library is not entirely straightforward. This document describes how this will work. + +## Status + +Proposed. + +## Authors + +@idg10 ([Ian Griffiths](https://endjin.com/who-we-are/our-people/ian-griffiths/)) + + +## Context + +As an accident of history, the Rx.NET repository ended up being the de facto implementation of LINQ for `IAsyncEnumerable` from 2019 when .NET Core 3 shipped up until late 2025 when .NET 10 shipped. + +This happened because Rx.NET had effectively been the incubator in which `IAsyncEnumerable` was originally developed. Back before .NET Core 3.0, there was no such interface built into .NET, but Rx _did_ define this interface as part of its 'interactive extensions for .NET' feature. It also implented common LINQ operators for that interface. + +.NET Core 3.0 defined its own version of this `IAsyncEnumerable`, but the .NET team did not choose to implement LINQ for it. Since the Rx.NET repository already had a fairly complete implentation of LINQ for its original version of `IAsyncEnumerable`, it took only a fairly small amount of work to adapt this to the new version of `IAsyncEnumerable` built into .NET. Thus `System.Linq.Async` was born. + +In .NET 10.0, the .NET team decided to take ownership of this functionality. For various reasons they did not simply adopt the existing code. (One reason is that .NET class library design guidelines have evolved over time, and some of the methods in Rx's `System.Linq.Async` did not align with those guidelines.) So the .NET team took the decision that they were not going to maintain backwards compatibility with the existing Rx.NET-originated `System.Linq.Async` library. Instead, there is a new `System.Linq.AsyncEnumerable` library that defines equivalent functionality, but implemented from scratch, and fully in conformance with current .NET class library design guidelines. + +Most of the API changes fall into one of these categories: + +1. Where `System.Linq.Async` defined methods taking an `IComparer` and an associated overload without the `IComparer`, `System.Linq.AsyncEnumerable` only defines the overload that takes the `IComparer`, making it optional with a default value of `null` +2. For certain operators (e.g. min, max, sum) `System.Linq.Async` defined methods operating directly on numerical sequences, and also ones that operate on sequences of any type, taking an addition argument to project each element to a numeric value; in `System.Linq.AsyncEnumerable`, these projection-based variants either have a different name (e.g. `MaxByAsync`) or simply don't exist (as with `SumAsync`) +3. `System.Linq.Async` offered some adapters (`ToEnumerable`, `ToObservable`) that handled async operations in potentially risky ways (sync over async, or fire-and-forget respectively); `System.Linq.AsyncEnumerable` has chosen simply not to implement these at all + +There are also a couple of cases where functionality simply has not been reproduced. `System.Linq.Async` provides an `AsAsyncEnumerable` to enable deliberate type erasure. TBD. + + +## Decision + +The next `System.Linq.Async` release will: + +1. add a reference to `System.Linq.AsyncEnumerable` +2. remove from publicly visible API (ref assemblies) all `IAsyncEnumerable` extension methods for which direct replacements exist +3. add [Obsolete] attribute for all remaining members of `AsyncEnumerable` +4. mark `IAsyncGrouping` as obsolete +5. TBD `IAsyncIListProvider` relocate? +6. continue to provide the full API in the `lib` assemblies to provide binary compatibility + + diff --git a/Ix.NET/Source/ApiCompare/ApiCompare.csproj b/Ix.NET/Source/ApiCompare/ApiCompare.csproj index 174cbcc1f..905863c51 100644 --- a/Ix.NET/Source/ApiCompare/ApiCompare.csproj +++ b/Ix.NET/Source/ApiCompare/ApiCompare.csproj @@ -5,6 +5,20 @@ net8.0 + + + + + + + + + SystemLinqAsyncEnumerable + + + + diff --git a/Ix.NET/Source/Benchmarks.System.Interactive/Benchmarks.System.Interactive.csproj b/Ix.NET/Source/Benchmarks.System.Interactive/Benchmarks.System.Interactive.csproj index 90a39816c..748770549 100644 --- a/Ix.NET/Source/Benchmarks.System.Interactive/Benchmarks.System.Interactive.csproj +++ b/Ix.NET/Source/Benchmarks.System.Interactive/Benchmarks.System.Interactive.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0 true Current Sources;Ix.net 3.1.1;Ix.net 3.2 diff --git a/Ix.NET/Source/FasterLinq/FasterLinq.csproj b/Ix.NET/Source/FasterLinq/FasterLinq.csproj index 8735c4467..5758ba8fc 100644 --- a/Ix.NET/Source/FasterLinq/FasterLinq.csproj +++ b/Ix.NET/Source/FasterLinq/FasterLinq.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0 $(NoWarn);IDE0007;IDE0034;IDE0040;IDE0063;IDE0090;IDE1006 diff --git a/Ix.NET/Source/Playground/Playground.csproj b/Ix.NET/Source/Playground/Playground.csproj index 174cbcc1f..7396a7ba8 100644 --- a/Ix.NET/Source/Playground/Playground.csproj +++ b/Ix.NET/Source/Playground/Playground.csproj @@ -14,4 +14,22 @@ + + + + + + + + + + SystemLinqAsyncEnumerable + + + diff --git a/Ix.NET/Source/System.Interactive.Async.Providers.Tests/System.Interactive.Async.Providers.Tests.csproj b/Ix.NET/Source/System.Interactive.Async.Providers.Tests/System.Interactive.Async.Providers.Tests.csproj index 0f4fbb98c..3d26121a3 100644 --- a/Ix.NET/Source/System.Interactive.Async.Providers.Tests/System.Interactive.Async.Providers.Tests.csproj +++ b/Ix.NET/Source/System.Interactive.Async.Providers.Tests/System.Interactive.Async.Providers.Tests.csproj @@ -1,7 +1,7 @@  - net48;net8.0;net6.0 + net48;net10.0;net8.0 $(NoWarn);CS0618 @@ -15,6 +15,25 @@ + + + + + + + + + + + SystemLinqAsyncEnumerable + + + diff --git a/Ix.NET/Source/System.Interactive.Async.Providers/System.Interactive.Async.Providers.csproj b/Ix.NET/Source/System.Interactive.Async.Providers/System.Interactive.Async.Providers.csproj index 5e214f941..aeafce882 100644 --- a/Ix.NET/Source/System.Interactive.Async.Providers/System.Interactive.Async.Providers.csproj +++ b/Ix.NET/Source/System.Interactive.Async.Providers/System.Interactive.Async.Providers.csproj @@ -3,7 +3,7 @@ Interactive Extensions Async Providers Library used to build query providers and express queries over async enumerable sequences. Interactive Extensions - Async Providers Library - net48;netstandard2.0;netstandard2.1;net6.0 + net48;netstandard2.0;netstandard2.1;net8.0 Ix;Interactive;Extensions;Enumerable;Asynchronous diff --git a/Ix.NET/Source/System.Interactive.Async.Tests/System.Interactive.Async.Tests.csproj b/Ix.NET/Source/System.Interactive.Async.Tests/System.Interactive.Async.Tests.csproj index 99ef36d68..90dfd4327 100644 --- a/Ix.NET/Source/System.Interactive.Async.Tests/System.Interactive.Async.Tests.csproj +++ b/Ix.NET/Source/System.Interactive.Async.Tests/System.Interactive.Async.Tests.csproj @@ -1,7 +1,7 @@  - net48;net8.0;net6.0 + net48;net10.0;net8.0 + + + + + + + + + SystemLinqAsyncEnumerable + + + diff --git a/Ix.NET/Source/System.Interactive.Async/System.Interactive.Async.csproj b/Ix.NET/Source/System.Interactive.Async/System.Interactive.Async.csproj index aa02a1e92..a092c2c3a 100644 --- a/Ix.NET/Source/System.Interactive.Async/System.Interactive.Async.csproj +++ b/Ix.NET/Source/System.Interactive.Async/System.Interactive.Async.csproj @@ -3,7 +3,7 @@ Interactive Extensions Async Library used to express queries over asynchronous enumerable sequences. Interactive Extensions - Async Library - net48;netstandard2.0;netstandard2.1;net6.0 + net48;netstandard2.0;netstandard2.1;net8.0 Ix;Interactive;Extensions;Enumerable;Asynchronous @@ -24,8 +24,8 @@ - - + + - + diff --git a/Ix.NET/Source/System.Interactive.Async/System/Linq/IAsyncIListProvider.cs b/Ix.NET/Source/System.Interactive.Async/System/Linq/IAsyncIListProvider.cs new file mode 100644 index 000000000..052ba2b51 --- /dev/null +++ b/Ix.NET/Source/System.Interactive.Async/System/Linq/IAsyncIListProvider.cs @@ -0,0 +1,52 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT License. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +namespace System.Linq +{ + /// + /// An iterator that can produce an array or through an optimized path. + /// + /// + /// This interface is primarily used for internal purposes as an optimization for LINQ operators. Its use is discouraged. + /// It was made public because it was originally defined in the System.Linq.Async package but also used in + /// System.Interactive.Async. Now that System.Linq.Async is being retired in favor of .NET 10.0's + /// System.Linq.AsyncEnumerable, the System.Interactive.Async package no longer takes a dependency on + /// System.Linq.Async, which is why it now defines its own version of this interface here. We can't put a type + /// forwarder in System.Interactive.Async to here because that would risk creating a circular dependency in + /// cases where an application managed to get out-of-sync versions of the two packages, so this interface is not + /// backwards compatible with the old one. If you were implementing this in your own types to get the associated + /// optimizations, be aware that this is not supported, but implementing this copy of the interface (in place of + /// the old version defined in the deprecated System.Linq.Async package) will continue to provide the + /// same (unsupported) behaviour. + /// + public interface IAsyncIListProvider : IAsyncEnumerable + { + /// + /// Produce an array of the sequence through an optimized path. + /// + /// + /// The array. + ValueTask ToArrayAsync(CancellationToken cancellationToken); + + /// + /// Produce a of the sequence through an optimized path. + /// + /// + /// The . + ValueTask> ToListAsync(CancellationToken cancellationToken); + + /// + /// Returns the count of elements in the sequence. + /// + /// If true then the count should only be calculated if doing + /// so is quick (sure or likely to be constant time), otherwise -1 should be returned. + /// + /// The number of elements. + ValueTask GetCountAsync(bool onlyIfCheap, CancellationToken cancellationToken); + } +} diff --git a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Scan.cs b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Scan.cs index fa0aca1c1..d839f46c4 100644 --- a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Scan.cs +++ b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Scan.cs @@ -16,7 +16,7 @@ public static partial class AsyncEnumerableEx /// /// Applies an accumulator function over an async-enumerable sequence and returns each intermediate result. - /// For aggregation behavior with no intermediate results, see . + /// For aggregation behavior with no intermediate results, see . /// /// The type of the elements in the source sequence and the result of the aggregation. /// An async-enumerable sequence to accumulate over. @@ -54,7 +54,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu /// /// Applies an accumulator function over an async-enumerable sequence and returns each intermediate result. The specified seed value is used as the initial accumulator value. - /// For aggregation behavior with no intermediate results, see . + /// For aggregation behavior with no intermediate results, see . /// /// The type of the elements in the source sequence. /// The type of the result of the aggregation. @@ -87,7 +87,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source /// /// Applies an asynchronous accumulator function over an async-enumerable sequence and returns each intermediate result. - /// For aggregation behavior with no intermediate results, see . + /// For aggregation behavior with no intermediate results, see . /// /// The type of the elements in the source sequence and the result of the aggregation. /// An async-enumerable sequence to accumulate over. @@ -126,7 +126,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu #if !NO_DEEP_CANCELLATION /// /// Applies an asynchronous (cancellable) accumulator function over an async-enumerable sequence and returns each intermediate result. - /// For aggregation behavior with no intermediate results, see . + /// For aggregation behavior with no intermediate results, see . /// /// The type of the elements in the source sequence and the result of the aggregation. /// An async-enumerable sequence to accumulate over. @@ -165,7 +165,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu /// /// Applies an asynchronous accumulator function over an async-enumerable sequence and returns each intermediate result. The specified seed value is used as the initial accumulator value. - /// For aggregation behavior with no intermediate results, see . + /// For aggregation behavior with no intermediate results, see . /// /// The type of the elements in the source sequence. /// The type of the result of the aggregation. @@ -199,7 +199,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source #if !NO_DEEP_CANCELLATION /// /// Applies an asynchronous (cancellable) accumulator function over an async-enumerable sequence and returns each intermediate result. The specified seed value is used as the initial accumulator value. - /// For aggregation behavior with no intermediate results, see . + /// For aggregation behavior with no intermediate results, see . /// /// The type of the elements in the source sequence. /// The type of the result of the aggregation. diff --git a/Ix.NET/Source/System.Linq.Async.Queryable.Tests/System.Linq.Async.Queryable.Tests.csproj b/Ix.NET/Source/System.Linq.Async.Queryable.Tests/System.Linq.Async.Queryable.Tests.csproj index b5a0dc04d..cdde11437 100644 --- a/Ix.NET/Source/System.Linq.Async.Queryable.Tests/System.Linq.Async.Queryable.Tests.csproj +++ b/Ix.NET/Source/System.Linq.Async.Queryable.Tests/System.Linq.Async.Queryable.Tests.csproj @@ -1,7 +1,7 @@  - net48;net8.0;net6.0 + net48;net10.0;net8.0 $(NoWarn);CS0618 @@ -16,6 +16,25 @@ + + + + + + + + + + SystemLinqAsyncEnumerable + + + + diff --git a/Ix.NET/Source/System.Linq.Async.Queryable/System.Linq.Async.Queryable.csproj b/Ix.NET/Source/System.Linq.Async.Queryable/System.Linq.Async.Queryable.csproj index f653bc91a..20f3263f8 100644 --- a/Ix.NET/Source/System.Linq.Async.Queryable/System.Linq.Async.Queryable.csproj +++ b/Ix.NET/Source/System.Linq.Async.Queryable/System.Linq.Async.Queryable.csproj @@ -1,7 +1,7 @@  - net48;netstandard2.0;netstandard2.1;net6.0 + net48;netstandard2.0;netstandard2.1;net10.0 System.Linq.Async.Queryable LINQ;async;streams;query;provider Provides support for Language-Integrated Query (LINQ) over IAsyncQueryable<T> sequences with query providers. @@ -11,6 +11,20 @@ + + + + + + + + + SystemLinqAsyncEnumerable + + + + AsyncQueryable.Generated.tt diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System.Linq.Async.Tests.csproj b/Ix.NET/Source/System.Linq.Async.Tests/System.Linq.Async.Tests.csproj index ed1c232ef..2c4e2a59d 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System.Linq.Async.Tests.csproj +++ b/Ix.NET/Source/System.Linq.Async.Tests/System.Linq.Async.Tests.csproj @@ -1,7 +1,7 @@  - net48;net8.0;net6.0 + net48;net10.0;net8.0 + + + + + + + + + SystemLinqAsyncEnumerable + + + + diff --git a/Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj b/Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj index 8c7df9bd2..c700c5b0f 100644 --- a/Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj +++ b/Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj @@ -1,7 +1,7 @@  - net48;netstandard2.0;netstandard2.1;net6.0 + net48;netstandard2.0;netstandard2.1;net10.0 System.Linq.Async LINQ;async;streams;query Provides support for Language-Integrated Query (LINQ) over IAsyncEnumerable<T> sequences. @@ -16,6 +16,17 @@ Pack="true" /> + + + $(DefineConstants);INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + + - $(NoWarn);NU5128;NU5131 + $(NoWarn);NU5128;NU5131;CS0618 @@ -57,10 +69,25 @@ - + + + + + + + + + + + SystemLinqAsyncEnumerable + + + + True diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncEnumerablePartition.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncEnumerablePartition.cs index 9e84bd79a..71ea00c74 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncEnumerablePartition.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncEnumerablePartition.cs @@ -11,6 +11,7 @@ namespace System.Linq { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// An iterator that yields the items of part of an . /// @@ -379,4 +380,5 @@ private static async ValueTask SkipAndCountAsync(uint index, IAsyncEnumera return index; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncIterator.Opt.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncIterator.Opt.cs index 045300b90..4bdf37667 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncIterator.Opt.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncIterator.Opt.cs @@ -8,6 +8,7 @@ namespace System.Linq { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES internal partial class AsyncIteratorBase { public virtual IAsyncEnumerable Select(Func selector) @@ -44,4 +45,5 @@ public virtual IAsyncEnumerable Where(Func /// An iterator that yields the items of part of an . /// @@ -182,4 +183,5 @@ public ValueTask GetCountAsync(bool onlyIfCheap, CancellationToken cancella return new ValueTask(Count); } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/IAsyncGrouping.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/IAsyncGrouping.cs index f89e9077b..e746d3413 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/IAsyncGrouping.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/IAsyncGrouping.cs @@ -6,6 +6,7 @@ namespace System.Linq { + // TODO: System.Linq does this as an IAsyncEnumerable> public interface IAsyncGrouping : IAsyncEnumerable { TKey Key { get; } diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/IAsyncIListProvider.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/IAsyncIListProvider.cs index 133742620..ee053df3d 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/IAsyncIListProvider.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/IAsyncIListProvider.cs @@ -11,6 +11,15 @@ namespace System.Linq /// /// An iterator that can produce an array or through an optimized path. /// + /// + /// This interface is primarily used for internal purposes as an optimization for LINQ operators. It was made public because + /// it was defined in the System.Linq.Async package but also used in System.Interactive.Async. Now that + /// System.Linq.Async is being retired in favor of .NET 10.0's System.Linq.AsyncEnumerable, the + /// System.Interactive.Async package no longer takes a dependency on System.Linq.Async, and therefore defines + /// its own version of this interface. We can't replace this with a type forwarder here because that would risk creating a + /// circular dependency in cases where an application managed to get out-of-sync versions of the two packages. + /// + [Obsolete("Use the definition of this type in the System.Interactive.Async NuGet package System.Linq.Async instead.")] // Can't use a type forwarder because public interface IAsyncIListProvider : IAsyncEnumerable { /// diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/IOrderedAsyncEnumerable.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/IOrderedAsyncEnumerable.cs index d7093b314..f50884996 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/IOrderedAsyncEnumerable.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/IOrderedAsyncEnumerable.cs @@ -8,6 +8,7 @@ namespace System.Linq { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Represents a sorted async-enumerable sequence. /// @@ -45,5 +46,6 @@ public interface IOrderedAsyncEnumerable : IAsyncEnumerableAn ordered async-enumerable whose elements are sorted according to a key. IOrderedAsyncEnumerable CreateOrderedEnumerable(Func> keySelector, IComparer? comparer, bool descending); #endif +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } } 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 255921225..0ee37871c 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 @@ -10,6 +10,10 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.aggregateasync?view=net-9.0-pp#system-linq-asyncenumerable-aggregateasync-1(system-collections-generic-iasyncenumerable((-0))-system-func((-0-0-0))-system-threading-cancellationtoken) + // public static ValueTask AggregateAsync(this IAsyncEnumerable source, Func func, CancellationToken cancellationToken = default); + /// /// Applies an accumulator function over an async-enumerable sequence, returning the result of the aggregation as a single element in the result sequence. /// For aggregation behavior with incremental intermediate results, see System.Interactive.Async.AsyncEnumerableEx.Scan{TSource}. @@ -50,6 +54,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Applies an accumulator function over an async-enumerable sequence, returning the result of the aggregation as a single element in the result sequence. @@ -63,6 +68,7 @@ static async ValueTask Core(IAsyncEnumerable source, FuncThe source sequence is empty. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] + [Obsolete("Use Aggregate. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ...Await... and ...WithCancellation... functionality now exists as overloads of Aggregate.")] private static ValueTask AggregateAwaitAsyncCore(this IAsyncEnumerable source, Func> accumulator, CancellationToken cancellationToken = default) { if (source == null) @@ -93,7 +99,16 @@ static async ValueTask Core(IAsyncEnumerable source, Func AggregateAsync( + // this IAsyncEnumerable source, TAccumulate seed, Func> func, Func> resultSelector, CancellationToken cancellationToken = default); + // Corresponds to: + // public static ValueTask AggregateAwaitWithCancellationAsync( + // this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, Func> resultSelector, CancellationToken cancellationToken = default) { } + [GenerateAsyncOverload] + [Obsolete("Use Aggregate. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ...Await... and ...WithCancellation... functionality now exists as overloads of Aggregate.")] private static ValueTask AggregateAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> accumulator, CancellationToken cancellationToken = default) { if (source == null) @@ -124,6 +139,11 @@ static async ValueTask Core(IAsyncEnumerable source, Func AggregateAsync(this IAsyncEnumerable source, TAccumulate seed, Func func, CancellationToken cancellationToken = default); + /// /// Applies an accumulator function over an async-enumerable sequence, returning the result of the aggregation as a single element in the result sequence. The specified seed value is used as the initial accumulator value. /// For aggregation behavior with incremental intermediate results, see System.Interactive.Async.AsyncEnumerableEx.Scan{TSource, Accumulate}". @@ -158,6 +178,7 @@ static async ValueTask Core(IAsyncEnumerable source, TAccu return acc; } } +#endif /// /// Applies an accumulator function over an async-enumerable sequence, returning the result of the aggregation as a single element in the result sequence. The specified seed value is used as the initial accumulator value. @@ -172,6 +193,7 @@ static async ValueTask Core(IAsyncEnumerable source, TAccu /// or is . /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] + [Obsolete("Use Aggregate. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ...Await... and ...WithCancellation... functionality now exists as overloads of Aggregate.")] private static ValueTask AggregateAwaitAsyncCore(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, CancellationToken cancellationToken = default) { if (source == null) @@ -196,6 +218,7 @@ static async ValueTask Core(IAsyncEnumerable source, TAccu #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use Aggregate. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ...Await... and ...WithCancellation... functionality now exists as overloads of Aggregate.")] private static ValueTask AggregateAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, CancellationToken cancellationToken = default) { if (source == null) @@ -219,6 +242,10 @@ static async ValueTask Core(IAsyncEnumerable source, TAccu } #endif +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.aggregateasync?view=net-9.0-pp#system-linq-asyncenumerable-aggregateasync-3(system-collections-generic-iasyncenumerable((-0))-1-system-func((-1-0-1))-system-func((-1-2))-system-threading-cancellationtoken) + // public static ValueTask AggregateAsync(this IAsyncEnumerable source, TAccumulate seed, Func func, Func resultSelector, CancellationToken cancellationToken = default); + /// /// Applies an accumulator function over an async-enumerable sequence, returning the result of the aggregation as a single element in the result sequence. The specified seed value is used as the initial accumulator value, /// and the specified result selector function is used to select the result value. @@ -257,6 +284,7 @@ static async ValueTask Core(IAsyncEnumerable source, TAccumula return resultSelector(acc); } } +#endif /// /// Applies an accumulator function over an async-enumerable sequence, returning the result of the aggregation as a single element in the result sequence. The specified seed value is used as the initial accumulator value, @@ -273,6 +301,7 @@ static async ValueTask Core(IAsyncEnumerable source, TAccumula /// A ValueTask containing the value obtained by applying the result selector to the final accumulator value. /// or or is . [GenerateAsyncOverload] + [Obsolete("Use Aggregate. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ...Await... and ...WithCancellation... functionality now exists as overloads of Aggregate.")] private static ValueTask AggregateAwaitAsyncCore(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, Func> resultSelector, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Grouping.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Grouping.cs index 218bbb764..4ec45dca0 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Grouping.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Grouping.cs @@ -10,6 +10,7 @@ namespace System.Linq.Internal { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// Adapted from System.Linq.Grouping from .NET Framework /// Source: https://github.com/dotnet/corefx/blob/b90532bc97b07234a7d18073819d019645285f1c/src/System.Linq/src/System/Linq/Grouping.cs#L64 internal class Grouping : IGrouping, IList, IAsyncGrouping @@ -106,4 +107,5 @@ IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(Cancell return this.ToAsyncEnumerable().GetAsyncEnumerator(cancellationToken); } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Lookup.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Lookup.cs index 854f1583d..0a468e528 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Lookup.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Lookup.cs @@ -11,6 +11,7 @@ namespace System.Linq.Internal { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES internal class Lookup : ILookup, IAsyncIListProvider> { private readonly IEqualityComparer _comparer; @@ -647,4 +648,5 @@ ValueTask[]> IAsyncIListProvider[]>(array); } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/OrderedAsyncEnumerable.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/OrderedAsyncEnumerable.cs index 54df9aa8f..717fcc925 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/OrderedAsyncEnumerable.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/OrderedAsyncEnumerable.cs @@ -9,6 +9,7 @@ namespace System.Linq { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES // NB: Large portions of the implementation are based on https://github.com/dotnet/corefx/blob/master/src/System.Linq/src/System/Linq/OrderedEnumerable.cs. internal abstract class OrderedAsyncEnumerable : AsyncIterator, IOrderedAsyncEnumerable, IAsyncPartition @@ -1216,4 +1217,5 @@ internal override async ValueTask SetElement(TElement element, CancellationToken } } #endif +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } diff --git a/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Tests.System.Interactive.ApiApprovals.csproj b/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Tests.System.Interactive.ApiApprovals.csproj index a6022437c..56606a674 100644 --- a/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Tests.System.Interactive.ApiApprovals.csproj +++ b/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Tests.System.Interactive.ApiApprovals.csproj @@ -9,6 +9,19 @@ true + + + + + + + + SystemLinqAsyncEnumerable + + + + diff --git a/Ix.NET/Source/refs/System.Linq.Async/System.Linq.Async.csproj b/Ix.NET/Source/refs/System.Linq.Async/System.Linq.Async.csproj index c2de741b9..7c46349cd 100644 --- a/Ix.NET/Source/refs/System.Linq.Async/System.Linq.Async.csproj +++ b/Ix.NET/Source/refs/System.Linq.Async/System.Linq.Async.csproj @@ -11,13 +11,13 @@ System.Linq.Async - + $(NoWarn);IDE0301;IDE0305 - + From a5e3a7fc1cf8949ac8877863190571c7ac2d3325 Mon Sep 17 00:00:00 2001 From: Ian Griffiths Date: Mon, 29 Sep 2025 17:19:06 +0100 Subject: [PATCH 02/10] Fix ref assembly build Turns out the solution doesn't build the ref assemblies and they weren't building. I also needed to modify the async code generator to correctly handle #if-ed out code. Turns out it was stripping the directives and then copying the disabled block of text in as leading trivia! This had the effect of copying #if-ed out methods into the generated code, making them reappear. I've also worked through the first four files of operators. --- .../AsyncOverloadsGenerator.cs | 31 +++++++++--- .../Properties/launchSettings.json | 11 +++++ .../System.Linq.Async.SourceGenerator.csproj | 1 + .../System/Linq/AsyncIterator.Opt.cs | 2 - .../System/Linq/IOrderedAsyncEnumerable.cs | 2 +- .../System/Linq/Operators/Aggregate.cs | 13 ++--- .../System/Linq/Operators/All.cs | 6 +++ .../System/Linq/Operators/Any.cs | 7 +++ .../System/Linq/Operators/AppendPrepend.cs | 6 +++ .../System/Linq/Operators/GroupBy.cs | 47 +++++++++++++++++++ .../System/Linq/Operators/Grouping.cs | 2 - .../System/Linq/Operators/Lookup.cs | 2 - .../System/Linq/Operators/OrderBy.cs | 4 +- .../System/Linq/Operators/Select.cs | 5 ++ .../Linq/Operators/ToAsyncEnumerable.cs | 2 + .../System.Linq.Async.csproj | 8 ++-- 16 files changed, 126 insertions(+), 23 deletions(-) create mode 100644 Ix.NET/Source/System.Linq.Async.SourceGenerator/Properties/launchSettings.json diff --git a/Ix.NET/Source/System.Linq.Async.SourceGenerator/AsyncOverloadsGenerator.cs b/Ix.NET/Source/System.Linq.Async.SourceGenerator/AsyncOverloadsGenerator.cs index b0c27ecfe..2856ee306 100644 --- a/Ix.NET/Source/System.Linq.Async.SourceGenerator/AsyncOverloadsGenerator.cs +++ b/Ix.NET/Source/System.Linq.Async.SourceGenerator/AsyncOverloadsGenerator.cs @@ -33,12 +33,13 @@ public void Execute(GeneratorExecutionContext context) if (context.SyntaxReceiver is not SyntaxReceiver syntaxReceiver) return; var options = GetGenerationOptions(context); + var attributeSymbol = GetAsyncOverloadAttributeSymbol(context); var methodsBySyntaxTree = GetMethodsGroupedBySyntaxTree(context, syntaxReceiver); foreach (var grouping in methodsBySyntaxTree) context.AddSource( $"{Path.GetFileNameWithoutExtension(grouping.SyntaxTree.FilePath)}.AsyncOverloads", - GenerateOverloads(grouping, options)); + GenerateOverloads(grouping, options, context, attributeSymbol)); } private static GenerationOptions GetGenerationOptions(GeneratorExecutionContext context) @@ -50,7 +51,7 @@ private static IEnumerable GetMethodsGroupedBySyntaxTree(Ge syntaxReceiver, GetAsyncOverloadAttributeSymbol(context)); - private static string GenerateOverloads(AsyncMethodGrouping grouping, GenerationOptions options) + private static string GenerateOverloads(AsyncMethodGrouping grouping, GenerationOptions options, GeneratorExecutionContext context, INamedTypeSymbol attributeSymbol) { var usings = grouping.SyntaxTree.GetRoot() is CompilationUnitSyntax compilationUnit ? compilationUnit.Usings.ToString() @@ -65,7 +66,10 @@ private static string GenerateOverloads(AsyncMethodGrouping grouping, Generation overloads.AppendLine(" {"); foreach (var method in grouping.Methods) - overloads.AppendLine(GenerateOverload(method, options)); + { + var model = context.Compilation.GetSemanticModel(method.Syntax.SyntaxTree); + overloads.AppendLine(GenerateOverload(method, options, model, attributeSymbol)); + } overloads.AppendLine(" }"); overloads.AppendLine("}"); @@ -73,8 +77,22 @@ private static string GenerateOverloads(AsyncMethodGrouping grouping, Generation return overloads.ToString(); } - private static string GenerateOverload(AsyncMethod method, GenerationOptions options) - => MethodDeclaration(method.Syntax.ReturnType, GetMethodName(method.Symbol, options)) + //var allLeadingTrivia = method.Syntax.GetLeadingTrivia(); + //var allLeadingTriviaStructure = method.Syntax.GetLeadingTrivia().Select(t => t.GetStructure()); + //var leadingTrivia = method.Syntax.GetLeadingTrivia().Where(t => !t.IsKind(SyntaxKind.DisabledTextTrivia) && t.GetStructure() is not DirectiveTriviaSyntax); + + private static string GenerateOverload(AsyncMethod method, GenerationOptions options, SemanticModel model, INamedTypeSymbol attributeSymbol) + { + var attributeListsWithGenerateAsyncOverloadRemoved = SyntaxFactory.List(method.Syntax.AttributeLists + .Select(list => AttributeList(SeparatedList( + (from a in list.Attributes + let am = model.GetSymbolInfo(a.Name).Symbol?.ContainingType + where !SymbolEqualityComparer.Default.Equals(am, attributeSymbol) + select a)))) + .Where(list => list.Attributes.Count > 0)); + + return MethodDeclaration(method.Syntax.ReturnType, GetMethodName(method.Symbol, options)) + .WithAttributeLists(attributeListsWithGenerateAsyncOverloadRemoved) .WithModifiers(TokenList(Token(SyntaxKind.PublicKeyword), Token(SyntaxKind.StaticKeyword))) .WithTypeParameterList(method.Syntax.TypeParameterList) .WithParameterList(method.Syntax.ParameterList) @@ -87,9 +105,10 @@ private static string GenerateOverload(AsyncMethod method, GenerationOptions opt method.Syntax.ParameterList.Parameters .Select(p => Argument(IdentifierName(p.Identifier)))))))) .WithSemicolonToken(Token(SyntaxKind.SemicolonToken)) - .WithLeadingTrivia(method.Syntax.GetLeadingTrivia().Where(t => t.GetStructure() is not DirectiveTriviaSyntax)) + .WithLeadingTrivia(method.Syntax.GetLeadingTrivia().Where(t => !t.IsKind(SyntaxKind.DisabledTextTrivia) && t.GetStructure() is not DirectiveTriviaSyntax)) .NormalizeWhitespace() .ToFullString(); + } private static INamedTypeSymbol GetAsyncOverloadAttributeSymbol(GeneratorExecutionContext context) => context.Compilation.GetTypeByMetadataName("System.Linq.GenerateAsyncOverloadAttribute") ?? throw new InvalidOperationException(); diff --git a/Ix.NET/Source/System.Linq.Async.SourceGenerator/Properties/launchSettings.json b/Ix.NET/Source/System.Linq.Async.SourceGenerator/Properties/launchSettings.json new file mode 100644 index 000000000..e1a11eac9 --- /dev/null +++ b/Ix.NET/Source/System.Linq.Async.SourceGenerator/Properties/launchSettings.json @@ -0,0 +1,11 @@ +{ + "profiles": { + "System.Linq.Async.SourceGenerator": { + "commandName": "Project" + }, + "Profile 1": { + "commandName": "DebugRoslynComponent", + "targetProject": "..\\refs\\System.Linq.Async\\System.Linq.Async.csproj" + } + } +} \ No newline at end of file diff --git a/Ix.NET/Source/System.Linq.Async.SourceGenerator/System.Linq.Async.SourceGenerator.csproj b/Ix.NET/Source/System.Linq.Async.SourceGenerator/System.Linq.Async.SourceGenerator.csproj index 8604e8dc6..51925c090 100644 --- a/Ix.NET/Source/System.Linq.Async.SourceGenerator/System.Linq.Async.SourceGenerator.csproj +++ b/Ix.NET/Source/System.Linq.Async.SourceGenerator/System.Linq.Async.SourceGenerator.csproj @@ -1,6 +1,7 @@ netstandard2.0 + true 9.0 false diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncIterator.Opt.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncIterator.Opt.cs index 4bdf37667..045300b90 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncIterator.Opt.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncIterator.Opt.cs @@ -8,7 +8,6 @@ namespace System.Linq { -#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES internal partial class AsyncIteratorBase { public virtual IAsyncEnumerable Select(Func selector) @@ -45,5 +44,4 @@ public virtual IAsyncEnumerable Where(Func : IAsyncEnumerableAn ordered async-enumerable whose elements are sorted according to a key. IOrderedAsyncEnumerable CreateOrderedEnumerable(Func> keySelector, IComparer? comparer, bool descending); #endif -#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } 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 0ee37871c..a6c3c11f8 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 @@ -12,7 +12,7 @@ public static partial class AsyncEnumerable { #if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.aggregateasync?view=net-9.0-pp#system-linq-asyncenumerable-aggregateasync-1(system-collections-generic-iasyncenumerable((-0))-system-func((-0-0-0))-system-threading-cancellationtoken) - // public static ValueTask AggregateAsync(this IAsyncEnumerable source, Func func, CancellationToken cancellationToken = default); + /// /// Applies an accumulator function over an async-enumerable sequence, returning the result of the aggregation as a single element in the result sequence. @@ -68,7 +68,7 @@ static async ValueTask Core(IAsyncEnumerable source, FuncThe source sequence is empty. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] - [Obsolete("Use Aggregate. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ...Await... and ...WithCancellation... functionality now exists as overloads of Aggregate.")] + [Obsolete("Use AggregateAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the AggregateAwaitAsync now exists as overloads of AggregateAsync.")] private static ValueTask AggregateAwaitAsyncCore(this IAsyncEnumerable source, Func> accumulator, CancellationToken cancellationToken = default) { if (source == null) @@ -108,7 +108,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func source, TAccumulate seed, Func> accumulator, Func> resultSelector, CancellationToken cancellationToken = default) { } [GenerateAsyncOverload] - [Obsolete("Use Aggregate. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ...Await... and ...WithCancellation... functionality now exists as overloads of Aggregate.")] + [Obsolete("Use AggregateAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the AggregateAwaitWithCancellationAsync functionality now exists as overloads of AggregateAsync.")] private static ValueTask AggregateAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> accumulator, CancellationToken cancellationToken = default) { if (source == null) @@ -193,7 +193,7 @@ static async ValueTask Core(IAsyncEnumerable source, TAccu /// or is . /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] - [Obsolete("Use Aggregate. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ...Await... and ...WithCancellation... functionality now exists as overloads of Aggregate.")] + [Obsolete("Use AggregateAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the AggregateAwaitAsync functionality now exists as overloads of AggregateAsync.")] private static ValueTask AggregateAwaitAsyncCore(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, CancellationToken cancellationToken = default) { if (source == null) @@ -218,7 +218,7 @@ static async ValueTask Core(IAsyncEnumerable source, TAccu #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] - [Obsolete("Use Aggregate. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ...Await... and ...WithCancellation... functionality now exists as overloads of Aggregate.")] + [Obsolete("Use AggregateAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the AggregateAwaitWithCancellationAsync functionality now exists as overloads of AggregateAsync.")] private static ValueTask AggregateAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, CancellationToken cancellationToken = default) { if (source == null) @@ -301,7 +301,7 @@ static async ValueTask Core(IAsyncEnumerable source, TAccumula /// A ValueTask containing the value obtained by applying the result selector to the final accumulator value. /// or or is . [GenerateAsyncOverload] - [Obsolete("Use Aggregate. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ...Await... and ...WithCancellation... functionality now exists as overloads of Aggregate.")] + [Obsolete("Use AggregateAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the AggregateAwaitAsync functionality now exists as overloads of AggregateAsync.")] private static ValueTask AggregateAwaitAsyncCore(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, Func> resultSelector, CancellationToken cancellationToken = default) { if (source == null) @@ -328,6 +328,7 @@ static async ValueTask Core(IAsyncEnumerable source, TAccumula #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use AggregateAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the AggregateAwaitWithCancellationAsync functionality now exists as overloads of AggregateAsync.")] private static ValueTask AggregateAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, Func> resultSelector, CancellationToken cancellationToken = default) { if (source == null) 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 f1b40e7b7..0ca91882a 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 @@ -10,6 +10,9 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.allasync?view=net-9.0-pp#system-linq-asyncenumerable-allasync-1(system-collections-generic-iasyncenumerable((-0))-system-func((-0-system-boolean))-system-threading-cancellationtoken) + /// /// Determines whether all elements of an async-enumerable sequence satisfy a condition. /// @@ -42,6 +45,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Determines whether all elements in an async-enumerable sequence satisfy a condition. @@ -54,6 +58,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func or is . /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] + [Obsolete("Use AllAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the AllAwaitAsync functionality now exists as overloads of All.")] private static ValueTask AllAwaitAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) @@ -79,6 +84,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func AllAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) 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 68138f4ca..e3fe100c0 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 @@ -10,6 +10,8 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.anyasync?view=net-9.0-pp#system-linq-asyncenumerable-anyasync-1(system-collections-generic-iasyncenumerable((-0))-system-threading-cancellationtoken) /// /// Determines whether an async-enumerable sequence contains any elements. /// @@ -34,6 +36,8 @@ static async ValueTask Core(IAsyncEnumerable source, Cancellation } } + //https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.anyasync?view=net-9.0-pp#system-linq-asyncenumerable-anyasync-1(system-collections-generic-iasyncenumerable((-0))-system-func((-0-system-boolean))-system-threading-cancellationtoken) + /// /// Determines whether any element of an async-enumerable sequence satisfies a condition. /// @@ -66,6 +70,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Determines whether any element in an async-enumerable sequence satisfies a condition. @@ -78,6 +83,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func or is . /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] + [Obsolete("Use AnyAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the AnyAwaitAsyncCore functionality now exists as overloads of AnyAsync.")] private static ValueTask AnyAwaitAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) @@ -103,6 +109,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func AnyAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/AppendPrepend.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/AppendPrepend.cs index 8b146d68c..d533b595d 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/AppendPrepend.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/AppendPrepend.cs @@ -12,6 +12,9 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.append?view=net-9.0-pp + /// /// Append a value to an async-enumerable sequence. /// @@ -33,6 +36,8 @@ public static IAsyncEnumerable Append(this IAsyncEnumerable(source, element, appending: true); } + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.prepend?view=net-9.0-pp + /// /// Prepend a value to an async-enumerable sequence. /// @@ -53,6 +58,7 @@ public static IAsyncEnumerable Prepend(this IAsyncEnumerable(source, element, appending: false); } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES private abstract class AppendPrependAsyncIterator : AsyncIterator, IAsyncIListProvider { 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 75f9459cc..5525b642b 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 @@ -10,6 +10,17 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // The next two methods are replaced by a single method in System.Linq.AsyncEnumerable: + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.groupby?view=net-9.0-pp#system-linq-asyncenumerable-groupby-2(system-collections-generic-iasyncenumerable((-0))-system-func((-0-1))-system-collections-generic-iequalitycomparer((-1))) + // It has a different signature from both: + // Returns an IAsyncEnumerable>, which is not the same as IAsyncGrouping + // Supplies a default value of null for the comparer + // That second difference is why there's only the one overload. + // The first difference seems large: IAsyncGrouping returns each group as an IAsyncEnumerable. In practice, + // the grouping operators enumerate the source to completion before returning anything so in practice this + // async capability is not used, and just complicates things for the consumer. + /// /// Groups the elements of an async-enumerable sequence according to a specified key selector function. /// @@ -34,6 +45,7 @@ public static IAsyncEnumerable> GroupBy or or is null. public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func keySelector, IEqualityComparer? comparer) => new GroupedAsyncEnumerable(source, keySelector, comparer); +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Groups the elements of an async-enumerable sequence according to a specified key selector function. @@ -45,6 +57,7 @@ public static IAsyncEnumerable> GroupByA sequence of async-enumerable groups, each of which corresponds to a unique key value, containing all elements that share that same key value. /// or is . [GenerateAsyncOverload] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable> GroupByAwaitCore(this IAsyncEnumerable source, Func> keySelector) => new GroupedAsyncEnumerableWithTask(source, keySelector, comparer: null); @@ -59,18 +72,31 @@ private static IAsyncEnumerable> GroupByAwaitCore< /// A sequence of async-enumerable groups, each of which corresponds to a unique key value, containing all elements that share that same key value. /// or or is . [GenerateAsyncOverload] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable> GroupByAwaitCore(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer? comparer) => new GroupedAsyncEnumerableWithTask(source, keySelector, comparer); #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable> GroupByAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector) => new GroupedAsyncEnumerableWithTaskAndCancellation(source, keySelector, comparer: null); [GenerateAsyncOverload] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable> GroupByAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer? comparer) => new GroupedAsyncEnumerableWithTaskAndCancellation(source, keySelector, comparer); #endif +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // The next two methods are replaced by a single method in System.Linq.AsyncEnumerable: + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.groupby?view=net-9.0-pp#system-linq-asyncenumerable-groupby-3(system-collections-generic-iasyncenumerable((-0))-system-func((-0-1))-system-func((-0-2))-system-collections-generic-iequalitycomparer((-1))) + // It has a different signature from both: + // Returns an IAsyncEnumerable>, which is not the same as IAsyncGrouping + // Supplies a default value of null for the comparer + // That second difference is why there's only the one overload. + // The first difference seems large: IAsyncGrouping returns each group as an IAsyncEnumerable. In practice, + // the grouping operators enumerate the source to completion before returning anything so in practice this + // async capability is not used, and just complicates things for the consumer. /// /// Groups the elements of an async-enumerable sequence and selects the resulting elements by using a specified function. @@ -100,6 +126,7 @@ public static IAsyncEnumerable> GroupBy or or or is null. public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func keySelector, Func elementSelector, IEqualityComparer? comparer) => new GroupedAsyncEnumerable(source, keySelector, elementSelector, comparer); +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Groups the elements of an async-enumerable sequence and selects the resulting elements by using a specified function. @@ -113,6 +140,7 @@ public static IAsyncEnumerable> GroupByA sequence of async-enumerable groups, each of which corresponds to a unique key value, containing all elements that share that same key value. /// or or is . [GenerateAsyncOverload] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable> GroupByAwaitCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector) => new GroupedAsyncEnumerableWithTask(source, keySelector, elementSelector, comparer: null); @@ -129,24 +157,30 @@ private static IAsyncEnumerable> GroupByAwaitCore /// A sequence of async-enumerable groups, each of which corresponds to a unique key value, containing all elements that share that same key value. /// or or or is . [GenerateAsyncOverload] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable> GroupByAwaitCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer? comparer) => new GroupedAsyncEnumerableWithTask(source, keySelector, elementSelector, comparer); #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable> GroupByAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector) => new GroupedAsyncEnumerableWithTaskAndCancellation(source, keySelector, elementSelector, comparer: null); [GenerateAsyncOverload] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable> GroupByAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer? comparer) => new GroupedAsyncEnumerableWithTaskAndCancellation(source, keySelector, elementSelector, comparer); #endif +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.groupby?view=net-9.0-pp#system-linq-asyncenumerable-groupby-3(system-collections-generic-iasyncenumerable((-0))-system-func((-0-1))-system-func((-1-system-collections-generic-ienumerable((-0))-2))-system-collections-generic-iequalitycomparer((-1))) public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func keySelector, Func, TResult> resultSelector) => new GroupedResultAsyncEnumerable(source, keySelector, resultSelector, comparer: null); public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func keySelector, Func, TResult> resultSelector, IEqualityComparer? comparer) => new GroupedResultAsyncEnumerable(source, keySelector, resultSelector, comparer); +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Groups the elements of an async-enumerable sequence according to a specified key selector function, and then applies a result selector function to each group. @@ -160,6 +194,7 @@ public static IAsyncEnumerable GroupBy(this IAs /// An async-enumerable sequence of results obtained by invoking and awaiting the result-selector function on each group. /// or or is . [GenerateAsyncOverload] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable GroupByAwaitCore(this IAsyncEnumerable source, Func> keySelector, Func, ValueTask> resultSelector) => new GroupedResultAsyncEnumerableWithTask(source, keySelector, resultSelector, comparer: null); @@ -176,24 +211,32 @@ private static IAsyncEnumerable GroupByAwaitCoreAn async-enumerable sequence of results obtained by invoking and awaiting the result-selector function on each group. /// or or or is . [GenerateAsyncOverload] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable GroupByAwaitCore(this IAsyncEnumerable source, Func> keySelector, Func, ValueTask> resultSelector, IEqualityComparer? comparer) => new GroupedResultAsyncEnumerableWithTask(source, keySelector, resultSelector, comparer); #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable GroupByAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector, Func, CancellationToken, ValueTask> resultSelector) => new GroupedResultAsyncEnumerableWithTaskAndCancellation(source, keySelector, resultSelector, comparer: null); [GenerateAsyncOverload] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable GroupByAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector, Func, CancellationToken, ValueTask> resultSelector, IEqualityComparer? comparer) => new GroupedResultAsyncEnumerableWithTaskAndCancellation(source, keySelector, resultSelector, comparer); #endif +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // This covers the next two + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.groupby?view=net-9.0-pp#system-linq-asyncenumerable-groupby-4(system-collections-generic-iasyncenumerable((-0))-system-func((-0-system-threading-cancellationtoken-system-threading-tasks-valuetask((-1))))-system-func((-0-system-threading-cancellationtoken-system-threading-tasks-valuetask((-2))))-system-func((-1-system-collections-generic-ienumerable((-2))-system-threading-cancellationtoken-system-threading-tasks-valuetask((-3))))-system-collections-generic-iequalitycomparer((-1))) + public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func keySelector, Func elementSelector, Func, TResult> resultSelector) => new GroupedResultAsyncEnumerable(source, keySelector, elementSelector, resultSelector, comparer: null); public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func keySelector, Func elementSelector, Func, TResult> resultSelector, IEqualityComparer? comparer) => new GroupedResultAsyncEnumerable(source, keySelector, elementSelector, resultSelector, comparer); +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Groups the elements of an async-enumerable sequence according to a specified key-selector function, applies an element selector to each element of each group, then applies a result selector to each transformed group. @@ -209,6 +252,7 @@ public static IAsyncEnumerable GroupByAn async-enumerable sequence of results obtained by invoking the result selector function on each group and awaiting the result. /// or or or is . [GenerateAsyncOverload] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable GroupByAwaitCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, ValueTask> resultSelector) => new GroupedResultAsyncEnumerableWithTask(source, keySelector, elementSelector, resultSelector, comparer: null); @@ -227,15 +271,18 @@ private static IAsyncEnumerable GroupByAwaitCoreAn async-enumerable sequence of results obtained by invoking the result selector function on each group and awaiting the result. /// or or or or is . [GenerateAsyncOverload] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] private 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 [GenerateAsyncOverload] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable GroupByAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, CancellationToken, ValueTask> resultSelector) => new GroupedResultAsyncEnumerableWithTaskAndCancellation(source, keySelector, elementSelector, resultSelector, comparer: null); [GenerateAsyncOverload] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable GroupByAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, CancellationToken, ValueTask> resultSelector, IEqualityComparer? comparer) => new GroupedResultAsyncEnumerableWithTaskAndCancellation(source, keySelector, elementSelector, resultSelector, comparer); #endif diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Grouping.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Grouping.cs index 4ec45dca0..218bbb764 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Grouping.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Grouping.cs @@ -10,7 +10,6 @@ namespace System.Linq.Internal { -#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// Adapted from System.Linq.Grouping from .NET Framework /// Source: https://github.com/dotnet/corefx/blob/b90532bc97b07234a7d18073819d019645285f1c/src/System.Linq/src/System/Linq/Grouping.cs#L64 internal class Grouping : IGrouping, IList, IAsyncGrouping @@ -107,5 +106,4 @@ IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(Cancell return this.ToAsyncEnumerable().GetAsyncEnumerator(cancellationToken); } } -#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Lookup.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Lookup.cs index 0a468e528..854f1583d 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Lookup.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Lookup.cs @@ -11,7 +11,6 @@ namespace System.Linq.Internal { -#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES internal class Lookup : ILookup, IAsyncIListProvider> { private readonly IEqualityComparer _comparer; @@ -648,5 +647,4 @@ ValueTask[]> IAsyncIListProvider[]>(array); } } -#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } 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 ecb1b1207..5d16689bd 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 @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT License. // See the LICENSE file in the project root for more information. @@ -8,6 +8,7 @@ namespace System.Linq { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES public static partial class AsyncEnumerable { /// @@ -326,4 +327,5 @@ private static IOrderedAsyncEnumerable ThenByDescendingAwaitWithCancell } #endif } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } 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 bcd1b9ffc..ff8383c30 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 @@ -10,6 +10,9 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.select?view=net-9.0-pp#system-linq-asyncenumerable-select-2(system-collections-generic-iasyncenumerable((-0))-system-func((-0-1))) + /// /// Projects each element of an async-enumerable sequence into a new form. /// @@ -33,6 +36,7 @@ public static IAsyncEnumerable Select(this IAsyncEnum _ => new SelectEnumerableAsyncIterator(source, selector), }; } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Projects each element of an async-enumerable sequence into a new form by incorporating the element's index. @@ -78,6 +82,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu /// An async-enumerable sequence whose elements are the result of invoking the transform function on each element of the source sequence and awaiting the result. /// or is null. [GenerateAsyncOverload] + [Obsolete("Use Aggregate. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the AggregateAwait and AggregateAwaitWithCancellationAsync functionality now exists as overloads of Aggregate.")] private static IAsyncEnumerable SelectAwaitCore(this IAsyncEnumerable source, Func> selector) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToAsyncEnumerable.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToAsyncEnumerable.cs index 483f45b0b..b3d1b69e0 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToAsyncEnumerable.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToAsyncEnumerable.cs @@ -9,6 +9,7 @@ namespace System.Linq { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES public static partial class AsyncEnumerable { /// @@ -301,4 +302,5 @@ public ValueTask GetCountAsync(bool onlyIfCheap, CancellationToken cancella bool ICollection.IsReadOnly => _source.IsReadOnly; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } diff --git a/Ix.NET/Source/refs/System.Linq.Async/System.Linq.Async.csproj b/Ix.NET/Source/refs/System.Linq.Async/System.Linq.Async.csproj index 7c46349cd..24ad29b46 100644 --- a/Ix.NET/Source/refs/System.Linq.Async/System.Linq.Async.csproj +++ b/Ix.NET/Source/refs/System.Linq.Async/System.Linq.Async.csproj @@ -6,7 +6,7 @@ LINQ Standard Query Operators used to express queries over asynchronous enumerable sequences. System.Linq.Async Microsoft - net48;netstandard2.0;netstandard2.1;net6.0 + net48;netstandard2.0;netstandard2.1;net10.0 Enumerable;Asynchronous;LINQ System.Linq.Async @@ -14,8 +14,10 @@ - $(NoWarn);IDE0301;IDE0305 + IDE0305 wants to turn things like list.ToArray into [..list], which we don't find to be an improvement in readability. + CS0618: Type or member is obsolete - this whole library is essentially obsolete, so internal use of obsolete features is OK and widespread. + --> + $(NoWarn);IDE0301;IDE0305;CS0618 From 638be50b82deffd588a5d108cdecb593183c0352 Mon Sep 17 00:00:00 2001 From: Ian Griffiths Date: Tue, 30 Sep 2025 08:28:38 +0100 Subject: [PATCH 03/10] Handle AverageAsync migration This is more complex than anything else so far for a couple of reasons. First this uses T4 templates to generate code which in turn contains the [GenerateAsyncOverload] attribute, so we have two levels of code generation. Second, System.Linq.AsyncEnumerable has elected not to implement all of the functionality available in System.Linq.Async (e.g. overloads taking selector callbacks). --- .../adr/0002-System-Linq-Async-In-Net10.md | 6 + .../System.Interactive.Async.csproj | 23 + .../Linq/Operators/AsAsyncEnumerable.cs | 26 + .../Linq/Operators/Average.Generated.cs | 1424 +++++++++++++++++ .../Linq/Operators/Average.Generated.tt | 318 ++++ .../AsyncOverloadsGenerator.cs | 10 +- .../Properties/launchSettings.json | 9 +- .../System.Linq.Async.Tests.csproj | 17 +- .../System.Linq.Async.csproj | 17 +- .../Linq/Operators/AsAsyncEnumerable.cs | 9 +- .../Linq/Operators/Average.Generated.cs | 53 +- .../Linq/Operators/Average.Generated.tt | 19 +- 12 files changed, 1905 insertions(+), 26 deletions(-) create mode 100644 Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/AsAsyncEnumerable.cs create mode 100644 Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Average.Generated.cs create mode 100644 Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Average.Generated.tt diff --git a/Ix.NET/Documentation/adr/0002-System-Linq-Async-In-Net10.md b/Ix.NET/Documentation/adr/0002-System-Linq-Async-In-Net10.md index aae4be861..1e33bb2f4 100644 --- a/Ix.NET/Documentation/adr/0002-System-Linq-Async-In-Net10.md +++ b/Ix.NET/Documentation/adr/0002-System-Linq-Async-In-Net10.md @@ -41,4 +41,10 @@ The next `System.Linq.Async` release will: 5. TBD `IAsyncIListProvider` relocate? 6. continue to provide the full API in the `lib` assemblies to provide binary compatibility +Note that not all of the XxxAwaitAsync and XxxAwaitWithCancellationAsync are handled the same way. In some cases, these now have replacements. E.g. System.Linq.AsyncEnumerable replaces AggregateAwaitAsync with an overload of AggregateAsync. So System.Linq.Async's ref assembly continues to make AggregateAwaitAsync available but marks it as Obsolete, telling you to use AggregateAsync instead. But there are some methods for which no replacement exists. We move these into System.Interactive.Async, because that's where `IAsyncEnumerable` features that have no equivalents in the .NET runtime libraries live. E.g., although `System.Linq.AsyncEnumerable` defines `AverageAsync`, it does not offer the same range of functionality as `System.Linq.Async` previously did: overloads taking selectors (both sync and async). These methods become hidden in `System.Linq.Async` (available only for binary compatibility) and they have moved to `AsyncEnumerableEx` in `System.Interactive.Async`, and `System.Linq.Async` now adds a transitive reference to `System.Interactive.Async` in order to ensure continued source compatibility until such time as people update their NuGet references. +combinations: + +* Method hidden in ref, available in `System.Linq.AsyncEnumerable` +* Method hidden in ref, available in `System.Interactive.Async` +* Method visible but marked as `Obsolete` \ No newline at end of file diff --git a/Ix.NET/Source/System.Interactive.Async/System.Interactive.Async.csproj b/Ix.NET/Source/System.Interactive.Async/System.Interactive.Async.csproj index a092c2c3a..2270a5232 100644 --- a/Ix.NET/Source/System.Interactive.Async/System.Interactive.Async.csproj +++ b/Ix.NET/Source/System.Interactive.Async/System.Interactive.Async.csproj @@ -28,4 +28,27 @@ + + + + + + + Average.Generated.tt + True + True + + + + + + Average.Generated.cs + TextTemplatingFileGenerator + + + + + + + diff --git a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/AsAsyncEnumerable.cs b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/AsAsyncEnumerable.cs new file mode 100644 index 000000000..b40187c52 --- /dev/null +++ b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/AsAsyncEnumerable.cs @@ -0,0 +1,26 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT License. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; + +namespace System.Linq +{ + public static partial class AsyncEnumerableEx + { + // NB: Synchronous LINQ to Objects doesn't hide the implementation of the source either. + + // Note: this was previous in System.Linq.Async, but since .NET 10.0's System.Linq.AsyncEnumerable chose not to + // implement it (even though Enumerable.AsEnumerable exists), we moved it into System.Interactive.Async so that + // it remains available even after developers remove their dependency on the deprecated System.Linq.Async. + + /// + /// Hides the identity of an async-enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// An async-enumerable sequence whose identity to hide. + /// An async-enumerable sequence that hides the identity of the source sequence. + /// is null. + public static IAsyncEnumerable AsAsyncEnumerable(this IAsyncEnumerable source) => source; + } +} diff --git a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Average.Generated.cs b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Average.Generated.cs new file mode 100644 index 000000000..a8cfe864a --- /dev/null +++ b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Average.Generated.cs @@ -0,0 +1,1424 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT License. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +namespace System.Linq +{ + public static partial class AsyncEnumerableEx + { + + /// + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values to calculate the average of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. + /// or is null. + /// (Asynchronous) The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + if (!await e.MoveNextAsync()) + { + throw Error.NoElements(); + } + + long sum = selector(e.Current); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + sum += selector(e.Current); + ++count; + } + } + + return (double)sum / count; + } + } + } + + /// + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. + /// + /// The type of elements in the source sequence. + /// An async-enumerable sequence of values to compute the average of. + /// A transform function to invoke and await on each element of the source sequence. + /// An optional cancellation token for cancelling the sequence at any time. + /// A ValueTask containing the average of the sequence of values. + /// or is . + /// The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + [GenerateAsyncOverload] + private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + if (!await e.MoveNextAsync()) + { + throw Error.NoElements(); + } + + long sum = await selector(e.Current).ConfigureAwait(false); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + sum += await selector(e.Current).ConfigureAwait(false); + ++count; + } + } + + return (double)sum / count; + } + } + } + +#if !NO_DEEP_CANCELLATION + [GenerateAsyncOverload] + private static ValueTask AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + if (!await e.MoveNextAsync()) + { + throw Error.NoElements(); + } + + long sum = await selector(e.Current, cancellationToken).ConfigureAwait(false); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + sum += await selector(e.Current, cancellationToken).ConfigureAwait(false); + ++count; + } + } + + return (double)sum / count; + } + } + } +#endif + + + /// + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values to calculate the average of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. + /// or is null. + /// (Asynchronous) The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + if (!await e.MoveNextAsync()) + { + throw Error.NoElements(); + } + + long sum = selector(e.Current); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + sum += selector(e.Current); + ++count; + } + } + + return (double)sum / count; + } + } + } + + /// + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. + /// + /// The type of elements in the source sequence. + /// An async-enumerable sequence of values to compute the average of. + /// A transform function to invoke and await on each element of the source sequence. + /// An optional cancellation token for cancelling the sequence at any time. + /// A ValueTask containing the average of the sequence of values. + /// or is . + /// The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + [GenerateAsyncOverload] + private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + if (!await e.MoveNextAsync()) + { + throw Error.NoElements(); + } + + long sum = await selector(e.Current).ConfigureAwait(false); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + sum += await selector(e.Current).ConfigureAwait(false); + ++count; + } + } + + return (double)sum / count; + } + } + } + +#if !NO_DEEP_CANCELLATION + [GenerateAsyncOverload] + private static ValueTask AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + if (!await e.MoveNextAsync()) + { + throw Error.NoElements(); + } + + long sum = await selector(e.Current, cancellationToken).ConfigureAwait(false); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + sum += await selector(e.Current, cancellationToken).ConfigureAwait(false); + ++count; + } + } + + return (double)sum / count; + } + } + } +#endif + + + /// + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values to calculate the average of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. + /// or is null. + /// (Asynchronous) The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + if (!await e.MoveNextAsync()) + { + throw Error.NoElements(); + } + + double sum = selector(e.Current); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + sum += selector(e.Current); + ++count; + } + } + + return (float)(sum / count); + } + } + } + + /// + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. + /// + /// The type of elements in the source sequence. + /// An async-enumerable sequence of values to compute the average of. + /// A transform function to invoke and await on each element of the source sequence. + /// An optional cancellation token for cancelling the sequence at any time. + /// A ValueTask containing the average of the sequence of values. + /// or is . + /// The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + [GenerateAsyncOverload] + private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + if (!await e.MoveNextAsync()) + { + throw Error.NoElements(); + } + + double sum = await selector(e.Current).ConfigureAwait(false); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + sum += await selector(e.Current).ConfigureAwait(false); + ++count; + } + } + + return (float)(sum / count); + } + } + } + +#if !NO_DEEP_CANCELLATION + [GenerateAsyncOverload] + private static ValueTask AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + if (!await e.MoveNextAsync()) + { + throw Error.NoElements(); + } + + double sum = await selector(e.Current, cancellationToken).ConfigureAwait(false); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + sum += await selector(e.Current, cancellationToken).ConfigureAwait(false); + ++count; + } + } + + return (float)(sum / count); + } + } + } +#endif + + + /// + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values to calculate the average of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. + /// or is null. + /// (Asynchronous) The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + if (!await e.MoveNextAsync()) + { + throw Error.NoElements(); + } + + double sum = selector(e.Current); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + sum += selector(e.Current); + ++count; + } + } + + return sum / count; + } + } + } + + /// + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. + /// + /// The type of elements in the source sequence. + /// An async-enumerable sequence of values to compute the average of. + /// A transform function to invoke and await on each element of the source sequence. + /// An optional cancellation token for cancelling the sequence at any time. + /// A ValueTask containing the average of the sequence of values. + /// or is . + /// The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + [GenerateAsyncOverload] + private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + if (!await e.MoveNextAsync()) + { + throw Error.NoElements(); + } + + double sum = await selector(e.Current).ConfigureAwait(false); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + sum += await selector(e.Current).ConfigureAwait(false); + ++count; + } + } + + return sum / count; + } + } + } + +#if !NO_DEEP_CANCELLATION + [GenerateAsyncOverload] + private static ValueTask AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + if (!await e.MoveNextAsync()) + { + throw Error.NoElements(); + } + + double sum = await selector(e.Current, cancellationToken).ConfigureAwait(false); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + sum += await selector(e.Current, cancellationToken).ConfigureAwait(false); + ++count; + } + } + + return sum / count; + } + } + } +#endif + + + /// + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values to calculate the average of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. + /// or is null. + /// (Asynchronous) The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + if (!await e.MoveNextAsync()) + { + throw Error.NoElements(); + } + + decimal sum = selector(e.Current); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + sum += selector(e.Current); + ++count; + } + } + + return sum / count; + } + } + } + + /// + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. + /// + /// The type of elements in the source sequence. + /// An async-enumerable sequence of values to compute the average of. + /// A transform function to invoke and await on each element of the source sequence. + /// An optional cancellation token for cancelling the sequence at any time. + /// A ValueTask containing the average of the sequence of values. + /// or is . + /// The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + [GenerateAsyncOverload] + private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + if (!await e.MoveNextAsync()) + { + throw Error.NoElements(); + } + + decimal sum = await selector(e.Current).ConfigureAwait(false); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + sum += await selector(e.Current).ConfigureAwait(false); + ++count; + } + } + + return sum / count; + } + } + } + +#if !NO_DEEP_CANCELLATION + [GenerateAsyncOverload] + private static ValueTask AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + if (!await e.MoveNextAsync()) + { + throw Error.NoElements(); + } + + decimal sum = await selector(e.Current, cancellationToken).ConfigureAwait(false); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + sum += await selector(e.Current, cancellationToken).ConfigureAwait(false); + ++count; + } + } + + return sum / count; + } + } + } +#endif + + + /// + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values to calculate the average of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. + /// or is null. + /// (Asynchronous) The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + while (await e.MoveNextAsync()) + { + var v = selector(e.Current); + if (v.HasValue) + { + long sum = v.GetValueOrDefault(); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + v = selector(e.Current); + if (v.HasValue) + { + sum += v.GetValueOrDefault(); + ++count; + } + } + } + + return (double)sum / count; + } + } + } + + return null; + } + } + + /// + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. + /// + /// The type of elements in the source sequence. + /// An async-enumerable sequence of values to compute the average of. + /// A transform function to invoke and await on each element of the source sequence. + /// An optional cancellation token for cancelling the sequence at any time. + /// A ValueTask containing the average of the sequence of values. + /// or is . + /// The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + [GenerateAsyncOverload] + private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + while (await e.MoveNextAsync()) + { + var v = await selector(e.Current).ConfigureAwait(false); + if (v.HasValue) + { + long sum = v.GetValueOrDefault(); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + v = await selector(e.Current).ConfigureAwait(false); + if (v.HasValue) + { + sum += v.GetValueOrDefault(); + ++count; + } + } + } + + return (double)sum / count; + } + } + } + + return null; + } + } + +#if !NO_DEEP_CANCELLATION + [GenerateAsyncOverload] + private static ValueTask AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + while (await e.MoveNextAsync()) + { + var v = await selector(e.Current, cancellationToken).ConfigureAwait(false); + if (v.HasValue) + { + long sum = v.GetValueOrDefault(); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + v = await selector(e.Current, cancellationToken).ConfigureAwait(false); + if (v.HasValue) + { + sum += v.GetValueOrDefault(); + ++count; + } + } + } + + return (double)sum / count; + } + } + } + + return null; + } + } +#endif + + + /// + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values to calculate the average of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. + /// or is null. + /// (Asynchronous) The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + while (await e.MoveNextAsync()) + { + var v = selector(e.Current); + if (v.HasValue) + { + long sum = v.GetValueOrDefault(); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + v = selector(e.Current); + if (v.HasValue) + { + sum += v.GetValueOrDefault(); + ++count; + } + } + } + + return (double)sum / count; + } + } + } + + return null; + } + } + + /// + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. + /// + /// The type of elements in the source sequence. + /// An async-enumerable sequence of values to compute the average of. + /// A transform function to invoke and await on each element of the source sequence. + /// An optional cancellation token for cancelling the sequence at any time. + /// A ValueTask containing the average of the sequence of values. + /// or is . + /// The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + [GenerateAsyncOverload] + private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + while (await e.MoveNextAsync()) + { + var v = await selector(e.Current).ConfigureAwait(false); + if (v.HasValue) + { + long sum = v.GetValueOrDefault(); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + v = await selector(e.Current).ConfigureAwait(false); + if (v.HasValue) + { + sum += v.GetValueOrDefault(); + ++count; + } + } + } + + return (double)sum / count; + } + } + } + + return null; + } + } + +#if !NO_DEEP_CANCELLATION + [GenerateAsyncOverload] + private static ValueTask AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + while (await e.MoveNextAsync()) + { + var v = await selector(e.Current, cancellationToken).ConfigureAwait(false); + if (v.HasValue) + { + long sum = v.GetValueOrDefault(); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + v = await selector(e.Current, cancellationToken).ConfigureAwait(false); + if (v.HasValue) + { + sum += v.GetValueOrDefault(); + ++count; + } + } + } + + return (double)sum / count; + } + } + } + + return null; + } + } +#endif + + + /// + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values to calculate the average of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. + /// or is null. + /// (Asynchronous) The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + while (await e.MoveNextAsync()) + { + var v = selector(e.Current); + if (v.HasValue) + { + double sum = v.GetValueOrDefault(); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + v = selector(e.Current); + if (v.HasValue) + { + sum += v.GetValueOrDefault(); + ++count; + } + } + } + + return (float)(sum / count); + } + } + } + + return null; + } + } + + /// + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. + /// + /// The type of elements in the source sequence. + /// An async-enumerable sequence of values to compute the average of. + /// A transform function to invoke and await on each element of the source sequence. + /// An optional cancellation token for cancelling the sequence at any time. + /// A ValueTask containing the average of the sequence of values. + /// or is . + /// The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + [GenerateAsyncOverload] + private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + while (await e.MoveNextAsync()) + { + var v = await selector(e.Current).ConfigureAwait(false); + if (v.HasValue) + { + double sum = v.GetValueOrDefault(); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + v = await selector(e.Current).ConfigureAwait(false); + if (v.HasValue) + { + sum += v.GetValueOrDefault(); + ++count; + } + } + } + + return (float)(sum / count); + } + } + } + + return null; + } + } + +#if !NO_DEEP_CANCELLATION + [GenerateAsyncOverload] + private static ValueTask AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + while (await e.MoveNextAsync()) + { + var v = await selector(e.Current, cancellationToken).ConfigureAwait(false); + if (v.HasValue) + { + double sum = v.GetValueOrDefault(); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + v = await selector(e.Current, cancellationToken).ConfigureAwait(false); + if (v.HasValue) + { + sum += v.GetValueOrDefault(); + ++count; + } + } + } + + return (float)(sum / count); + } + } + } + + return null; + } + } +#endif + + + /// + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values to calculate the average of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. + /// or is null. + /// (Asynchronous) The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + while (await e.MoveNextAsync()) + { + var v = selector(e.Current); + if (v.HasValue) + { + double sum = v.GetValueOrDefault(); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + v = selector(e.Current); + if (v.HasValue) + { + sum += v.GetValueOrDefault(); + ++count; + } + } + } + + return sum / count; + } + } + } + + return null; + } + } + + /// + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. + /// + /// The type of elements in the source sequence. + /// An async-enumerable sequence of values to compute the average of. + /// A transform function to invoke and await on each element of the source sequence. + /// An optional cancellation token for cancelling the sequence at any time. + /// A ValueTask containing the average of the sequence of values. + /// or is . + /// The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + [GenerateAsyncOverload] + private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + while (await e.MoveNextAsync()) + { + var v = await selector(e.Current).ConfigureAwait(false); + if (v.HasValue) + { + double sum = v.GetValueOrDefault(); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + v = await selector(e.Current).ConfigureAwait(false); + if (v.HasValue) + { + sum += v.GetValueOrDefault(); + ++count; + } + } + } + + return sum / count; + } + } + } + + return null; + } + } + +#if !NO_DEEP_CANCELLATION + [GenerateAsyncOverload] + private static ValueTask AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + while (await e.MoveNextAsync()) + { + var v = await selector(e.Current, cancellationToken).ConfigureAwait(false); + if (v.HasValue) + { + double sum = v.GetValueOrDefault(); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + v = await selector(e.Current, cancellationToken).ConfigureAwait(false); + if (v.HasValue) + { + sum += v.GetValueOrDefault(); + ++count; + } + } + } + + return sum / count; + } + } + } + + return null; + } + } +#endif + + + /// + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values to calculate the average of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. + /// or is null. + /// (Asynchronous) The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + while (await e.MoveNextAsync()) + { + var v = selector(e.Current); + if (v.HasValue) + { + decimal sum = v.GetValueOrDefault(); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + v = selector(e.Current); + if (v.HasValue) + { + sum += v.GetValueOrDefault(); + ++count; + } + } + } + + return sum / count; + } + } + } + + return null; + } + } + + /// + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. + /// + /// The type of elements in the source sequence. + /// An async-enumerable sequence of values to compute the average of. + /// A transform function to invoke and await on each element of the source sequence. + /// An optional cancellation token for cancelling the sequence at any time. + /// A ValueTask containing the average of the sequence of values. + /// or is . + /// The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + [GenerateAsyncOverload] + private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + while (await e.MoveNextAsync()) + { + var v = await selector(e.Current).ConfigureAwait(false); + if (v.HasValue) + { + decimal sum = v.GetValueOrDefault(); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + v = await selector(e.Current).ConfigureAwait(false); + if (v.HasValue) + { + sum += v.GetValueOrDefault(); + ++count; + } + } + } + + return sum / count; + } + } + } + + return null; + } + } + +#if !NO_DEEP_CANCELLATION + [GenerateAsyncOverload] + private static ValueTask AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + while (await e.MoveNextAsync()) + { + var v = await selector(e.Current, cancellationToken).ConfigureAwait(false); + if (v.HasValue) + { + decimal sum = v.GetValueOrDefault(); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + v = await selector(e.Current, cancellationToken).ConfigureAwait(false); + if (v.HasValue) + { + sum += v.GetValueOrDefault(); + ++count; + } + } + } + + return sum / count; + } + } + } + + return null; + } + } +#endif + + } +} diff --git a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Average.Generated.tt b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Average.Generated.tt new file mode 100644 index 000000000..499c04e97 --- /dev/null +++ b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Average.Generated.tt @@ -0,0 +1,318 @@ +<#@ template debug="false" hostspecific="false" language="C#" #> +<#@ assembly name="System.Core" #> +<#@ import namespace="System.Linq" #> +<#@ import namespace="System.Text" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ output extension=".cs" #> +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT License. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +namespace System.Linq +{ +<# +// Although .NET 10.0's System.Linq.AsyncEnumerable defines AverageAsync, it is missing some features that were previously defined in System.Linq.Async: +// Overloads of AverageAsync accepting a selector function (e.g. xs.AverageAsync(x => x.Value)) +// The AverageAwaitAsync variants accepting an async selector function returning a ValueTask +// The AverageAwaitWithCancellationAsync variant where an async selector function accepts a CancellationToken +// Since we are deprecating System.Linq.Async, these methods are now available there only in the runtime (lib) assemblies and not the +// ref assemblies. So they are available for binary backwards compatibility, but are not visible during compilation. This is necessary +// to ensure that code now gets the .NET 10 implementations of AverageAsync where available. But we want to enable code that was using +// the functionality that .NET 10 did not replicate to be able to continue to work after removing the reference to System.Linq.Async. +// So we've moved the relevant functionality back into System.Interactive.Async because that has always been the home of LINQ-like +// features for IAsyncEnumerable that aren't part of the core LINQ functionality. +#> + public static partial class AsyncEnumerableEx + { +<# +var os = new[] +{ + new { type = "int", res = "double", sum = "long" }, + new { type = "long", res = "double", sum = "long" }, + new { type = "float", res = "float", sum = "double" }, + new { type = "double", res = "double", sum = "double" }, + new { type = "decimal", res = "decimal", sum = "decimal" }, + new { type = "int?", res = "double?", sum = "long" }, + new { type = "long?", res = "double?", sum = "long" }, + new { type = "float?", res = "float?", sum = "double" }, + new { type = "double?", res = "double?", sum = "double" }, + new { type = "decimal?", res = "decimal?", sum = "decimal" }, +}; + +foreach (var o in os) +{ + var isNullable = o.type.EndsWith("?"); + var t = o.type.TrimEnd('?'); + + string res = ""; + + if (t == "int" || t == "long") + res = "(double)sum / count"; + else if (t == "double" || t == "decimal") + res = "sum / count"; + else if (t == "float") + res = "(float)(sum / count)"; + + var typeStr = o.type; + if (isNullable) { + typeStr = "Nullable{" + o.type.Substring(0, 1).ToUpper() + o.type.Substring(1, o.type.Length - 2) + "}"; + } +#> + + /// + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values to calculate the average of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. + /// or is null. + /// (Asynchronous) The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + public static ValueTask<<#=o.res#>> AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask<<#=o.res#>> Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + { +<# +if (isNullable) +{ +#> + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + while (await e.MoveNextAsync()) + { + var v = selector(e.Current); + if (v.HasValue) + { + <#=o.sum#> sum = v.GetValueOrDefault(); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + v = selector(e.Current); + if (v.HasValue) + { + sum += v.GetValueOrDefault(); + ++count; + } + } + } + + return <#=res#>; + } + } + } + + return null; +<# +} +else +{ +#> + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + if (!await e.MoveNextAsync()) + { + throw Error.NoElements(); + } + + <#=o.sum#> sum = selector(e.Current); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + sum += selector(e.Current); + ++count; + } + } + + return <#=res#>; + } +<# +} +#> + } + } + + /// + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. + /// + /// The type of elements in the source sequence. + /// An async-enumerable sequence of values to compute the average of. + /// A transform function to invoke and await on each element of the source sequence. + /// An optional cancellation token for cancelling the sequence at any time. + /// A ValueTask containing the average of the sequence of values. + /// or is . + /// The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + [GenerateAsyncOverload] + private static ValueTask<<#=o.res#>> AverageAwaitAsyncCore(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask<<#=o.res#>> Core(IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken) + { +<# +if (isNullable) +{ +#> + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + while (await e.MoveNextAsync()) + { + var v = await selector(e.Current).ConfigureAwait(false); + if (v.HasValue) + { + <#=o.sum#> sum = v.GetValueOrDefault(); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + v = await selector(e.Current).ConfigureAwait(false); + if (v.HasValue) + { + sum += v.GetValueOrDefault(); + ++count; + } + } + } + + return <#=res#>; + } + } + } + + return null; +<# +} +else +{ +#> + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + if (!await e.MoveNextAsync()) + { + throw Error.NoElements(); + } + + <#=o.sum#> sum = await selector(e.Current).ConfigureAwait(false); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + sum += await selector(e.Current).ConfigureAwait(false); + ++count; + } + } + + return <#=res#>; + } +<# +} +#> + } + } + +#if !NO_DEEP_CANCELLATION + [GenerateAsyncOverload] + private static ValueTask<<#=o.res#>> AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + if (selector == null) + throw Error.ArgumentNull(nameof(selector)); + + return Core(source, selector, cancellationToken); + + static async ValueTask<<#=o.res#>> Core(IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken) + { +<# +if (isNullable) +{ +#> + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + while (await e.MoveNextAsync()) + { + var v = await selector(e.Current, cancellationToken).ConfigureAwait(false); + if (v.HasValue) + { + <#=o.sum#> sum = v.GetValueOrDefault(); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + v = await selector(e.Current, cancellationToken).ConfigureAwait(false); + if (v.HasValue) + { + sum += v.GetValueOrDefault(); + ++count; + } + } + } + + return <#=res#>; + } + } + } + + return null; +<# +} +else +{ +#> + await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) + { + if (!await e.MoveNextAsync()) + { + throw Error.NoElements(); + } + + <#=o.sum#> sum = await selector(e.Current, cancellationToken).ConfigureAwait(false); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + sum += await selector(e.Current, cancellationToken).ConfigureAwait(false); + ++count; + } + } + + return <#=res#>; + } +<# +} +#> + } + } +#endif + +<# +} +#> + } +} diff --git a/Ix.NET/Source/System.Linq.Async.SourceGenerator/AsyncOverloadsGenerator.cs b/Ix.NET/Source/System.Linq.Async.SourceGenerator/AsyncOverloadsGenerator.cs index 2856ee306..6300d4b99 100644 --- a/Ix.NET/Source/System.Linq.Async.SourceGenerator/AsyncOverloadsGenerator.cs +++ b/Ix.NET/Source/System.Linq.Async.SourceGenerator/AsyncOverloadsGenerator.cs @@ -57,12 +57,20 @@ private static string GenerateOverloads(AsyncMethodGrouping grouping, Generation ? compilationUnit.Usings.ToString() : string.Empty; + // This source generator gets used not just in System.Linq.Async, but also for code that has migrated from + // System.Linq.Async to System.Interactive.Async. (E.g., we define overloads of AverageAsync that accept + // selector callbacks. The .NET runtime library implementation offers no equivalents. We want to continue + // to offer these even though we're decprecating System.Linq.Async, so they migrate into + // System.Interactive.Async.) In those cases, the containing type is typically AsyncEnumerableEx, + // but in System.Linq.Async it is AsyncEnumerable. So we need to discover the containing type name. + var containingTypeName = grouping.Methods.First().Symbol.ContainingType.Name; + var overloads = new StringBuilder(); overloads.AppendLine("#nullable enable"); overloads.AppendLine(usings); overloads.AppendLine("namespace System.Linq"); overloads.AppendLine("{"); - overloads.AppendLine(" partial class AsyncEnumerable"); + overloads.AppendLine($" partial class {containingTypeName}"); overloads.AppendLine(" {"); foreach (var method in grouping.Methods) diff --git a/Ix.NET/Source/System.Linq.Async.SourceGenerator/Properties/launchSettings.json b/Ix.NET/Source/System.Linq.Async.SourceGenerator/Properties/launchSettings.json index e1a11eac9..ecfa363e7 100644 --- a/Ix.NET/Source/System.Linq.Async.SourceGenerator/Properties/launchSettings.json +++ b/Ix.NET/Source/System.Linq.Async.SourceGenerator/Properties/launchSettings.json @@ -1,11 +1,12 @@ { "profiles": { - "System.Linq.Async.SourceGenerator": { - "commandName": "Project" + "System.Linq.Async": { + "commandName": "DebugRoslynComponent", + "targetProject": "..\\System.Linq.Async\\System.Linq.Async.csproj" }, - "Profile 1": { + "System.Interactive.Async": { "commandName": "DebugRoslynComponent", - "targetProject": "..\\refs\\System.Linq.Async\\System.Linq.Async.csproj" + "targetProject": "..\\System.Interactive.Async\\System.Interactive.Async.csproj" } } } \ No newline at end of file diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System.Linq.Async.Tests.csproj b/Ix.NET/Source/System.Linq.Async.Tests/System.Linq.Async.Tests.csproj index 2c4e2a59d..23e5b8294 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System.Linq.Async.Tests.csproj +++ b/Ix.NET/Source/System.Linq.Async.Tests/System.Linq.Async.Tests.csproj @@ -41,6 +41,20 @@ + + + SystemInteractiveAsync + @@ -50,8 +64,7 @@ So although we get this references transitively (or automatically on .NET 10.0+) we need to put them explicitly here to set aliases. --> - + diff --git a/Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj b/Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj index c700c5b0f..37fe0f601 100644 --- a/Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj +++ b/Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj @@ -70,13 +70,22 @@ + + + - + @@ -148,4 +157,8 @@ + + + + diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/AsAsyncEnumerable.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/AsAsyncEnumerable.cs index ed1bc26d7..141663037 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/AsAsyncEnumerable.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/AsAsyncEnumerable.cs @@ -7,8 +7,14 @@ namespace System.Linq { public static partial class AsyncEnumerable - { // NB: Synchronous LINQ to Objects doesn't hide the implementation of the source either. + { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // Note: this one isn't actually in the System.Linq.AsyncEnumerable package, so we've moved it + // to System.Interactive.Async because that's the home for LINQ-like implementations for + // IAsyncEnumerable that aren't in the runtime libraries. + // It therefore remains available only for runtime binary compatibility, and is no longer + // visible in System.Linq.Async at compile time. /// /// Hides the identity of an async-enumerable sequence. @@ -18,5 +24,6 @@ public static partial class AsyncEnumerable /// An async-enumerable sequence that hides the identity of the source sequence. /// is null. public static IAsyncEnumerable AsAsyncEnumerable(this IAsyncEnumerable source) => source; +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } } 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 abc41a542..0081d23b2 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 @@ -10,6 +10,7 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Computes the average of an async-enumerable sequence of values. /// @@ -177,7 +178,9 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the average of an async-enumerable sequence of values. /// @@ -264,7 +267,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. /// /// The type of elements in the source sequence. /// An async-enumerable sequence of values to compute the average of. @@ -345,7 +348,9 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the average of an async-enumerable sequence of values. /// @@ -432,7 +437,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. /// /// The type of elements in the source sequence. /// An async-enumerable sequence of values to compute the average of. @@ -513,7 +518,9 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the average of an async-enumerable sequence of values. /// @@ -600,7 +607,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. /// /// The type of elements in the source sequence. /// An async-enumerable sequence of values to compute the average of. @@ -681,7 +688,9 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the average of an async-enumerable sequence of values. /// @@ -768,7 +777,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. /// /// The type of elements in the source sequence. /// An async-enumerable sequence of values to compute the average of. @@ -849,7 +858,9 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the average of an async-enumerable sequence of values. /// @@ -952,14 +963,15 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. /// /// The type of elements in the source sequence. /// An async-enumerable sequence of values to compute the average of. /// A transform function to invoke and await on each element of the source sequence. /// An optional cancellation token for cancelling the sequence at any time. - /// A ValueTask containing the average of the sequence of values, or if the source sequence is empty. + /// A ValueTask containing the average of the sequence of values. /// or is . + /// The source sequence is empty. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) @@ -1048,7 +1060,9 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the average of an async-enumerable sequence of values. /// @@ -1151,14 +1165,15 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. /// /// The type of elements in the source sequence. /// An async-enumerable sequence of values to compute the average of. /// A transform function to invoke and await on each element of the source sequence. /// An optional cancellation token for cancelling the sequence at any time. - /// A ValueTask containing the average of the sequence of values, or if the source sequence is empty. + /// A ValueTask containing the average of the sequence of values. /// or is . + /// The source sequence is empty. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) @@ -1247,7 +1262,9 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the average of an async-enumerable sequence of values. /// @@ -1350,14 +1367,15 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. /// /// The type of elements in the source sequence. /// An async-enumerable sequence of values to compute the average of. /// A transform function to invoke and await on each element of the source sequence. /// An optional cancellation token for cancelling the sequence at any time. - /// A ValueTask containing the average of the sequence of values, or if the source sequence is empty. + /// A ValueTask containing the average of the sequence of values. /// or is . + /// The source sequence is empty. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) @@ -1446,7 +1464,9 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the average of an async-enumerable sequence of values. /// @@ -1549,14 +1569,15 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. /// /// The type of elements in the source sequence. /// An async-enumerable sequence of values to compute the average of. /// A transform function to invoke and await on each element of the source sequence. /// An optional cancellation token for cancelling the sequence at any time. - /// A ValueTask containing the average of the sequence of values, or if the source sequence is empty. + /// A ValueTask containing the average of the sequence of values. /// or is . + /// The source sequence is empty. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) @@ -1645,7 +1666,9 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the average of an async-enumerable sequence of values. /// @@ -1748,14 +1771,15 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. /// /// The type of elements in the source sequence. /// An async-enumerable sequence of values to compute the average of. /// A transform function to invoke and await on each element of the source sequence. /// An optional cancellation token for cancelling the sequence at any time. - /// A ValueTask containing the average of the sequence of values, or if the source sequence is empty. + /// A ValueTask containing the average of the sequence of values. /// or is . + /// The source sequence is empty. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) @@ -1843,6 +1867,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Computes the average of an async-enumerable sequence of values. /// @@ -215,7 +216,19 @@ else } } - internal static ValueTask<<#=o.res#>> AverageAwaitAsyncCore(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) + /// + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. + /// + /// The type of elements in the source sequence. + /// An async-enumerable sequence of values to compute the average of. + /// A transform function to invoke and await on each element of the source sequence. + /// An optional cancellation token for cancelling the sequence at any time. + /// A ValueTask containing the average of the sequence of values. + /// or is . + /// The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + [GenerateAsyncOverload] + private static ValueTask<<#=o.res#>> AverageAwaitAsyncCore(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -290,7 +303,8 @@ else } #if !NO_DEEP_CANCELLATION - internal static ValueTask<<#=o.res#>> AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) + [GenerateAsyncOverload] + private static ValueTask<<#=o.res#>> AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -364,6 +378,7 @@ else } } #endif +#endif <# } From 8a96d97d04945767face4a5b8bc461069bf4ddbf Mon Sep 17 00:00:00 2001 From: Ian Griffiths Date: Tue, 30 Sep 2025 10:19:39 +0100 Subject: [PATCH 04/10] Update operators as far as Min --- .../System/Linq/Operators/Any.cs | 2 +- .../System/Linq/Operators/Cast.cs | 4 + .../System/Linq/Operators/Concat.cs | 4 + .../System/Linq/Operators/Contains.cs | 7 + .../System/Linq/Operators/Count.cs | 15 ++ .../System/Linq/Operators/DefaultIfEmpty.cs | 2 + .../System/Linq/Operators/Distinct.cs | 6 + .../System/Linq/Operators/ElementAt.cs | 4 + .../Linq/Operators/ElementAtOrDefault.cs | 4 + .../System/Linq/Operators/Empty.cs | 4 + .../System/Linq/Operators/Except.cs | 6 + .../System/Linq/Operators/First.cs | 11 + .../System/Linq/Operators/FirstOrDefault.cs | 10 + .../System/Linq/Operators/ForEach.cs | 6 + .../System/Linq/Operators/GroupBy.cs | 32 +-- .../System/Linq/Operators/GroupJoin.cs | 9 + .../System/Linq/Operators/Intersect.cs | 5 + .../System/Linq/Operators/Join.cs | 11 + .../System/Linq/Operators/Last.cs | 9 + .../System/Linq/Operators/LastOrDefault.cs | 10 + .../System/Linq/Operators/LongCount.cs | 8 + .../System/Linq/Operators/Max.cs | 15 ++ .../System/Linq/Operators/Min.cs | 15 ++ .../System/Linq/Operators/MinMax.Generated.cs | 236 ++++++++++++------ .../System/Linq/Operators/MinMax.Generated.tt | 25 +- 25 files changed, 359 insertions(+), 101 deletions(-) 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 e3fe100c0..14925d51b 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 @@ -83,7 +83,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func or is . /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] - [Obsolete("Use AnyAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the AnyAwaitAsyncCore functionality now exists as overloads of AnyAsync.")] + [Obsolete("Use AnyAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the AnyAwaitAsync functionality now exists as overloads of AnyAsync.")] private static ValueTask AnyAwaitAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Cast.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Cast.cs index c52be4f98..3d54b9543 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Cast.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Cast.cs @@ -13,6 +13,9 @@ public static partial class AsyncEnumerable // NB: This is a non-standard LINQ operator, because we don't have a non-generic IAsyncEnumerable. // We're keeping it to enable `from T x in xs` binding in C#. +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.cast?view=net-9.0-pp + /// /// Converts the elements of an async-enumerable sequence to the specified type. /// @@ -40,5 +43,6 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, [Sy } } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } } diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Concat.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Concat.cs index aabfcd187..3733b3248 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Concat.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Concat.cs @@ -11,6 +11,9 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.concat?view=net-9.0-pp + /// /// Concatenates the second async-enumerable sequence to the first async-enumerable sequence upon successful termination of the first. /// @@ -253,5 +256,6 @@ internal override ConcatAsyncIterator Concat(IAsyncEnumerable } } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } } diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Contains.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Contains.cs index 79779f120..1efc87304 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Contains.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Contains.cs @@ -10,6 +10,12 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.containsasync?view=net-9.0-pp + // + // These two overloads are replaced by the single method above, which takes a comparer, but supplies a default + // value of null. + /// /// Determines whether an async-enumerable sequence contains a specified element by using the default equality comparer. /// @@ -78,5 +84,6 @@ static async ValueTask Core(IAsyncEnumerable source, TSource valu } } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } } 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 ba839a4a4..43b43e913 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 @@ -11,6 +11,9 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.countasync?view=net-9.0-pp#system-linq-asyncenumerable-countasync-1(system-collections-generic-iasyncenumerable((-0))-system-threading-cancellationtoken) + /// /// Returns an async-enumerable sequence containing an that represents the total number of elements in an async-enumerable sequence. /// @@ -50,6 +53,8 @@ static async ValueTask Core(IAsyncEnumerable source, CancellationT } } + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.countasync?view=net-9.0-pp#system-linq-asyncenumerable-countasync-1(system-collections-generic-iasyncenumerable((-0))-system-func((-0-system-boolean))-system-threading-cancellationtoken) + /// /// Returns an async-enumerable sequence containing an that represents how many elements in the specified async-enumerable sequence satisfy a condition. /// @@ -87,6 +92,14 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Counts the elements in an async-enumerable sequence that satisfy a condition. @@ -98,6 +111,7 @@ static async ValueTask Core(IAsyncEnumerable source, FuncA ValueTask containing the number of elements in the sequence that satisfy the predicate. /// or is . [GenerateAsyncOverload] + [Obsolete("Use CountAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the CountAwaitAsync functionality now exists as overloads of CountAsync.")] private static ValueTask CountAwaitAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) @@ -127,6 +141,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func CountAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/DefaultIfEmpty.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/DefaultIfEmpty.cs index 8fe637ffa..a3aabbd51 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/DefaultIfEmpty.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/DefaultIfEmpty.cs @@ -11,6 +11,7 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Returns the elements of the specified sequence or the type parameter's default value in a singleton sequence if the sequence is empty. /// @@ -136,5 +137,6 @@ public async ValueTask GetCountAsync(bool onlyIfCheap, CancellationToken ca return count == 0 ? 1 : count; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } } diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Distinct.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Distinct.cs index ba7618c43..fda821da3 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Distinct.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Distinct.cs @@ -10,6 +10,11 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.distinct?view=net-9.0-pp + // These two overloads are covered by a single method in System.Linq.AsyncEnumerable. Its only method + // takes a comparer, but specifies a default value of null. + /// /// Returns an async-enumerable sequence that contains only distinct elements. /// @@ -139,5 +144,6 @@ private Task> FillSetAsync(CancellationToken cancellationToken) return AsyncEnumerableHelpers.ToSet(_source, _comparer, cancellationToken); } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } } diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ElementAt.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ElementAt.cs index 97d4a2bca..9ccf32866 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ElementAt.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ElementAt.cs @@ -10,6 +10,9 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.elementatasync?view=net-9.0-pp#system-linq-asyncenumerable-elementatasync-1(system-collections-generic-iasyncenumerable((-0))-system-int32-system-threading-cancellationtoken) + /// /// Returns the element at a specified index in a sequence. /// @@ -66,5 +69,6 @@ static async ValueTask Core(IAsyncEnumerable source, int index throw Error.ArgumentOutOfRange(nameof(index)); } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } } diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ElementAtOrDefault.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ElementAtOrDefault.cs index c06a09af3..a22dd503f 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ElementAtOrDefault.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ElementAtOrDefault.cs @@ -10,6 +10,9 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.elementatordefaultasync?view=net-9.0-pp#system-linq-asyncenumerable-elementatordefaultasync-1(system-collections-generic-iasyncenumerable((-0))-system-int32-system-threading-cancellationtoken) + /// /// Returns the element at a specified index in a sequence or a default value if the index is out of range. /// @@ -65,5 +68,6 @@ public static partial class AsyncEnumerable return default; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } } diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Empty.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Empty.cs index 7509ef4dc..a6d975a4d 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Empty.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Empty.cs @@ -10,6 +10,9 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.empty?view=net-9.0-pp + /// /// Returns an empty async-enumerable sequence. /// @@ -50,5 +53,6 @@ public IAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellatio public ValueTask DisposeAsync() => default; } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } } diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Except.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Except.cs index 56c51c2f9..1bdfa7297 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Except.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Except.cs @@ -10,6 +10,11 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.except?view=net-9.0-pp + // + // These two overloads are replaced by the single method above, which takes a comparer, but supplies a default + // value of null. /// /// Produces the set difference of two async-enumerable sequences by using the default equality comparer to compare values. /// @@ -57,5 +62,6 @@ static async IAsyncEnumerable Core(IAsyncEnumerable first, IAs } } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } } 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 2bcfbb862..55df31271 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 @@ -10,6 +10,9 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.firstasync?view=net-9.0-pp#system-linq-asyncenumerable-firstasync-1(system-collections-generic-iasyncenumerable((-0))-system-threading-cancellationtoken) + /// /// Returns the first element of an async-enumerable sequence. /// @@ -34,6 +37,8 @@ static async ValueTask Core(IAsyncEnumerable source, Cancellat } } + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.firstasync?view=net-9.0-pp#system-linq-asyncenumerable-firstasync-1(system-collections-generic-iasyncenumerable((-0))-system-func((-0-system-boolean))-system-threading-cancellationtoken) + /// /// Returns the first element of an async-enumerable sequence that satisfies the condition in the predicate. /// @@ -60,6 +65,10 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the first element of an async-enumerable sequence that satisfies the condition in the predicate. @@ -72,6 +81,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func or is . /// No element satisfies the condition in the predicate. -or- The source sequence is empty. [GenerateAsyncOverload] + [Obsolete("Use FirstAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the FirstAwaitAsync functionality now exists as overloads of FirstAsync.")] private static ValueTask FirstAwaitAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) @@ -91,6 +101,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func FirstAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) 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 d67b50ada..ea1a5345b 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 @@ -10,6 +10,9 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.firstordefaultasync?view=net-9.0-pp#system-linq-asyncenumerable-firstordefaultasync-1(system-collections-generic-iasyncenumerable((-0))-system-threading-cancellationtoken) + /// /// Returns the first element of an async-enumerable sequence, or a default value if no such element exists. /// @@ -33,6 +36,8 @@ public static partial class AsyncEnumerable } } + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.firstordefaultasync?view=net-9.0-pp#system-linq-asyncenumerable-firstordefaultasync-1(system-collections-generic-iasyncenumerable((-0))-system-func((-0-system-boolean))-system-threading-cancellationtoken) + /// /// Returns the first element of an async-enumerable sequence that satisfies the condition in the predicate, or a default value if no such element exists. /// @@ -58,6 +63,9 @@ public static partial class AsyncEnumerable return first.HasValue ? first.Value : default; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.firstordefaultasync?view=net-9.0-pp#system-linq-asyncenumerable-firstordefaultasync-1(system-collections-generic-iasyncenumerable((-0))-system-func((-0-system-threading-cancellationtoken-system-threading-tasks-valuetask((system-boolean))))-system-threading-cancellationtoken) /// /// Returns the first element of an async-enumerable sequence that satisfies the condition in the predicate, or a default value if no element satisfies the condition in the predicate. @@ -69,6 +77,7 @@ public static partial class AsyncEnumerable /// A ValueTask containing the first element in the sequence that satisfies the predicate, or a default value if no element satisfies the predicate. /// or is . [GenerateAsyncOverload] + [Obsolete("Use FirstOrDefaultAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the FirstOrDefaultAwaitAsync functionality now exists as overloads of FirstOrDefaultAsync.")] private static ValueTask FirstOrDefaultAwaitAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) @@ -88,6 +97,7 @@ public static partial class AsyncEnumerable #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use FirstOrDefaultAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the FirstOrDefaultAwaitWithCancellationAsync functionality now exists as overloads of FirstOrDefaultAsync.")] private static ValueTask FirstOrDefaultAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) 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 6e0302feb..6648c0f11 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 @@ -27,6 +27,7 @@ public static partial class AsyncEnumerable /// Task that signals the termination of the sequence. /// or is null. /// This operator is especially useful in conjunction with the asynchronous programming features introduced in C# 5.0 and Visual Basic 11. + [Obsolete("Use the language support for async foreach instead.")] public static Task ForEachAsync(this IAsyncEnumerable source, Action action, CancellationToken cancellationToken = default) { if (source == null) @@ -55,6 +56,7 @@ static async Task Core(IAsyncEnumerable source, Action action, /// Task that signals the termination of the sequence. /// or is null. /// This operator is especially useful in conjunction with the asynchronous programming features introduced in C# 5.0 and Visual Basic 11. + [Obsolete("Use the language support for async foreach instead.")] public static Task ForEachAsync(this IAsyncEnumerable source, Action action, CancellationToken cancellationToken = default) { if (source == null) @@ -85,6 +87,7 @@ static async Task Core(IAsyncEnumerable source, Action ac /// Task that signals the termination of the sequence. /// or is . [GenerateAsyncOverload] + [Obsolete("Use the language support for async foreach instead.")] private static Task ForEachAwaitAsyncCore(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken = default) { if (source == null) @@ -105,6 +108,7 @@ static async Task Core(IAsyncEnumerable source, Func act #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use the language support for async foreach instead.")] internal static Task ForEachAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken) { if (source == null) @@ -134,6 +138,7 @@ static async Task Core(IAsyncEnumerable source, FuncTask that signals the termination of the sequence. /// or is . [GenerateAsyncOverload] + [Obsolete("Use the language support for async foreach instead.")] private static Task ForEachAwaitAsyncCore(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken = default) { if (source == null) @@ -156,6 +161,7 @@ static async Task Core(IAsyncEnumerable source, Func(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken) { if (source == null) 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 5525b642b..cd684e72a 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 @@ -57,7 +57,7 @@ public static IAsyncEnumerable> GroupByA sequence of async-enumerable groups, each of which corresponds to a unique key value, containing all elements that share that same key value. /// or is . [GenerateAsyncOverload] - [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable> GroupByAwaitCore(this IAsyncEnumerable source, Func> keySelector) => new GroupedAsyncEnumerableWithTask(source, keySelector, comparer: null); @@ -72,18 +72,18 @@ private static IAsyncEnumerable> GroupByAwaitCore< /// A sequence of async-enumerable groups, each of which corresponds to a unique key value, containing all elements that share that same key value. /// or or is . [GenerateAsyncOverload] - [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable> GroupByAwaitCore(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer? comparer) => new GroupedAsyncEnumerableWithTask(source, keySelector, comparer); #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] - [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable> GroupByAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector) => new GroupedAsyncEnumerableWithTaskAndCancellation(source, keySelector, comparer: null); [GenerateAsyncOverload] - [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable> GroupByAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer? comparer) => new GroupedAsyncEnumerableWithTaskAndCancellation(source, keySelector, comparer); #endif @@ -140,7 +140,7 @@ public static IAsyncEnumerable> GroupByA sequence of async-enumerable groups, each of which corresponds to a unique key value, containing all elements that share that same key value. /// or or is . [GenerateAsyncOverload] - [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable> GroupByAwaitCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector) => new GroupedAsyncEnumerableWithTask(source, keySelector, elementSelector, comparer: null); @@ -157,18 +157,18 @@ private static IAsyncEnumerable> GroupByAwaitCore /// A sequence of async-enumerable groups, each of which corresponds to a unique key value, containing all elements that share that same key value. /// or or or is . [GenerateAsyncOverload] - [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable> GroupByAwaitCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer? comparer) => new GroupedAsyncEnumerableWithTask(source, keySelector, elementSelector, comparer); #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] - [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable> GroupByAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector) => new GroupedAsyncEnumerableWithTaskAndCancellation(source, keySelector, elementSelector, comparer: null); [GenerateAsyncOverload] - [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable> GroupByAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer? comparer) => new GroupedAsyncEnumerableWithTaskAndCancellation(source, keySelector, elementSelector, comparer); #endif @@ -194,7 +194,7 @@ public static IAsyncEnumerable GroupBy(this IAs /// An async-enumerable sequence of results obtained by invoking and awaiting the result-selector function on each group. /// or or is . [GenerateAsyncOverload] - [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable GroupByAwaitCore(this IAsyncEnumerable source, Func> keySelector, Func, ValueTask> resultSelector) => new GroupedResultAsyncEnumerableWithTask(source, keySelector, resultSelector, comparer: null); @@ -211,18 +211,18 @@ private static IAsyncEnumerable GroupByAwaitCoreAn async-enumerable sequence of results obtained by invoking and awaiting the result-selector function on each group. /// or or or is . [GenerateAsyncOverload] - [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable GroupByAwaitCore(this IAsyncEnumerable source, Func> keySelector, Func, ValueTask> resultSelector, IEqualityComparer? comparer) => new GroupedResultAsyncEnumerableWithTask(source, keySelector, resultSelector, comparer); #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] - [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable GroupByAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector, Func, CancellationToken, ValueTask> resultSelector) => new GroupedResultAsyncEnumerableWithTaskAndCancellation(source, keySelector, resultSelector, comparer: null); [GenerateAsyncOverload] - [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable GroupByAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector, Func, CancellationToken, ValueTask> resultSelector, IEqualityComparer? comparer) => new GroupedResultAsyncEnumerableWithTaskAndCancellation(source, keySelector, resultSelector, comparer); #endif @@ -252,7 +252,7 @@ public static IAsyncEnumerable GroupByAn async-enumerable sequence of results obtained by invoking the result selector function on each group and awaiting the result. /// or or or is . [GenerateAsyncOverload] - [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable GroupByAwaitCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, ValueTask> resultSelector) => new GroupedResultAsyncEnumerableWithTask(source, keySelector, elementSelector, resultSelector, comparer: null); @@ -271,18 +271,18 @@ private static IAsyncEnumerable GroupByAwaitCoreAn async-enumerable sequence of results obtained by invoking the result selector function on each group and awaiting the result. /// or or or or is . [GenerateAsyncOverload] - [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait functionality now exists as overloads of GroupBy.")] private 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 [GenerateAsyncOverload] - [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable GroupByAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, CancellationToken, ValueTask> resultSelector) => new GroupedResultAsyncEnumerableWithTaskAndCancellation(source, keySelector, elementSelector, resultSelector, comparer: null); [GenerateAsyncOverload] - [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwait and GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] + [Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupByAwaitWithCancellationAsync functionality now exists as overloads of GroupBy.")] private static IAsyncEnumerable GroupByAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, CancellationToken, ValueTask> resultSelector, IEqualityComparer? comparer) => new GroupedResultAsyncEnumerableWithTaskAndCancellation(source, keySelector, elementSelector, resultSelector, comparer); #endif 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 e1182bc95..59af1f8e5 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 @@ -10,6 +10,10 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.groupjoin?view=net-9.0-pp#system-linq-asyncenumerable-groupjoin-4(system-collections-generic-iasyncenumerable((-0))-system-collections-generic-iasyncenumerable((-1))-system-func((-0-2))-system-func((-1-2))-system-func((-0-system-collections-generic-ienumerable((-1))-3))-system-collections-generic-iequalitycomparer((-2))) + // The method above covers the next two overloads because it supplies a default null value for comparer. + /// /// Correlates the elements of two async-enumerable sequences based on equality of keys and groups the results. The default equality comparer is used to compare keys. /// @@ -75,12 +79,15 @@ static async IAsyncEnumerable Core(IAsyncEnumerable outer, IAsy } } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES [GenerateAsyncOverload] + [Obsolete("Use GroupJoin. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupJoinAwait functionality now exists as overloads of GroupJoin.")] private static IAsyncEnumerable GroupJoinAwaitCore(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, ValueTask> resultSelector) => GroupJoinAwaitCore(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer: null); [GenerateAsyncOverload] + [Obsolete("Use GroupJoin. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupJoinAwait functionality now exists as overloads of GroupJoin.")] private static IAsyncEnumerable GroupJoinAwaitCore(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, ValueTask> resultSelector, IEqualityComparer? comparer) { if (outer == null) @@ -117,10 +124,12 @@ static async IAsyncEnumerable Core(IAsyncEnumerable outer, IAsy #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use GroupJoin. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupJoinAwaitWithCancellation functionality now exists as overloads of GroupJoin.")] private static IAsyncEnumerable GroupJoinAwaitWithCancellationCore(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, CancellationToken, ValueTask> resultSelector) => GroupJoinAwaitWithCancellationCore(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer: null); [GenerateAsyncOverload] + [Obsolete("Use GroupJoin. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the GroupJoinAwaitWithCancellation functionality now exists as overloads of GroupJoin.")] private static IAsyncEnumerable GroupJoinAwaitWithCancellationCore(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, CancellationToken, ValueTask> resultSelector, IEqualityComparer? comparer) { if (outer == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Intersect.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Intersect.cs index 00c76f0bb..1e5639e6c 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Intersect.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Intersect.cs @@ -10,6 +10,10 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.intersect?view=net-9.0-pp + // The method above covers the next two overloads because it supplies a default null value for comparer. + /// /// Produces the set intersection of two async-enumerable sequences by using the default equality comparer to compare values. /// @@ -57,5 +61,6 @@ static async IAsyncEnumerable Core(IAsyncEnumerable first, IAs } } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } } 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 e27723c9f..cb80f6cb0 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 @@ -10,6 +10,10 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.join?view=net-9.0-pp#system-linq-asyncenumerable-join-4(system-collections-generic-iasyncenumerable((-0))-system-collections-generic-iasyncenumerable((-1))-system-func((-0-2))-system-func((-1-2))-system-func((-0-1-3))-system-collections-generic-iequalitycomparer((-2))) + // The method above covers the next two overloads because it supplies a default null value for comparer. + /// /// Correlates the elements of two sequences based on matching keys. The default equality comparer is used to compare keys. /// @@ -91,12 +95,17 @@ static async IAsyncEnumerable Core(IAsyncEnumerable outer, IAsy } } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.join?view=net-9.0-pp#system-linq-asyncenumerable-join-4(system-collections-generic-iasyncenumerable((-0))-system-collections-generic-iasyncenumerable((-1))-system-func((-0-system-threading-cancellationtoken-system-threading-tasks-valuetask((-2))))-system-func((-1-system-threading-cancellationtoken-system-threading-tasks-valuetask((-2))))-system-func((-0-1-system-threading-cancellationtoken-system-threading-tasks-valuetask((-3))))-system-collections-generic-iequalitycomparer((-2))) [GenerateAsyncOverload] + [Obsolete("Use Join. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the JoinAwait functionality now exists as overloads of Join.")] private static IAsyncEnumerable JoinAwaitCore(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector) => JoinAwaitCore(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer: null); [GenerateAsyncOverload] + [Obsolete("Use Join. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the JoinAwait functionality now exists as overloads of Join.")] private static IAsyncEnumerable JoinAwaitCore(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector, IEqualityComparer? comparer) { if (outer == null) @@ -149,10 +158,12 @@ static async IAsyncEnumerable Core(IAsyncEnumerable outer, IAsy #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use Join. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the JoinAwaitWithCancellation functionality now exists as overloads of Join.")] private static IAsyncEnumerable JoinAwaitWithCancellationCore(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector) => JoinAwaitWithCancellationCore(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer: null); [GenerateAsyncOverload] + [Obsolete("Use Join. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the JoinAwaitWithCancellation functionality now exists as overloads of Join.")] private static IAsyncEnumerable JoinAwaitWithCancellationCore(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector, IEqualityComparer? comparer) { if (outer == null) 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 0e77b193c..b4087d545 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 @@ -10,6 +10,9 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.lastasync?view=net-9.0-pp#system-linq-asyncenumerable-lastasync-1(system-collections-generic-iasyncenumerable((-0))-system-threading-cancellationtoken) + /// /// Returns the last element of an async-enumerable sequence. /// @@ -34,6 +37,8 @@ static async ValueTask Core(IAsyncEnumerable source, Cancellat } } + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.lastasync?view=net-9.0-pp#system-linq-asyncenumerable-lastasync-1(system-collections-generic-iasyncenumerable((-0))-system-func((-0-system-boolean))-system-threading-cancellationtoken) + /// /// Returns the last element of an async-enumerable sequence that satisfies the condition in the predicate. /// @@ -61,6 +66,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the last element of an async-enumerable sequence that satisfies the condition in the predicate. /// @@ -72,6 +79,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func or is null. /// (Asynchronous) No element satisfies the condition in the predicate. -or- The source sequence is empty. [GenerateAsyncOverload] + [Obsolete("Use LastAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the LastAwaitAsync functionality now exists as overloads of LastAsync.")] private static ValueTask LastAwaitAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) @@ -91,6 +99,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func LastAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) 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 9dae828c1..1a1c2fe53 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 @@ -10,6 +10,9 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.lastordefaultasync?view=net-9.0-pp#system-linq-asyncenumerable-lastordefaultasync-1(system-collections-generic-iasyncenumerable((-0))-system-threading-cancellationtoken) + /// /// Returns the last element of an async-enumerable sequence, or a default value if no such element exists. /// @@ -33,6 +36,8 @@ public static partial class AsyncEnumerable } } + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.lastordefaultasync?view=net-9.0-pp#system-linq-asyncenumerable-lastordefaultasync-1(system-collections-generic-iasyncenumerable((-0))-system-func((-0-system-boolean))-system-threading-cancellationtoken) + /// /// Returns the last element of an async-enumerable sequence that satisfies the condition in the predicate, or a default value if no such element exists. /// @@ -58,6 +63,9 @@ public static partial class AsyncEnumerable return last.HasValue ? last.Value : default; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.lastordefaultasync?view=net-9.0-pp#system-linq-asyncenumerable-lastordefaultasync-1(system-collections-generic-iasyncenumerable((-0))-system-func((-0-system-threading-cancellationtoken-system-threading-tasks-valuetask((system-boolean))))-system-threading-cancellationtoken) /// /// Returns the last element of an async-enumerable sequence that satisfies the condition in the predicate, or a default value if no such element exists. @@ -69,6 +77,7 @@ public static partial class AsyncEnumerable /// ValueTask containing the last element in the async-enumerable sequence that satisfies the condition in the predicate, or a default value if no such element exists. /// or is null. [GenerateAsyncOverload] + [Obsolete("Use LastOrDefaultAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the LastOrDefaultAwaitAsync functionality now exists as overloads of LastOrDefaultAsync.")] private static ValueTask LastOrDefaultAwaitAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) @@ -88,6 +97,7 @@ public static partial class AsyncEnumerable #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use LastOrDefaultAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the LastOrDefaultAwaitWithCancellationAsync functionality now exists as overloads of LastOrDefaultAsync.")] private static ValueTask LastOrDefaultAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) 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 463ce0ec0..e62e94e7f 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 @@ -10,6 +10,9 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.longcountasync?view=net-9.0-pp#system-linq-asyncenumerable-longcountasync-1(system-collections-generic-iasyncenumerable((-0))-system-threading-cancellationtoken) + /// /// Returns an async-enumerable sequence containing an that represents the total number of elements in an async-enumerable sequence. /// @@ -43,6 +46,8 @@ static async ValueTask Core(IAsyncEnumerable source, Cancellation } } + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.longcountasync?view=net-9.0-pp#system-linq-asyncenumerable-longcountasync-1(system-collections-generic-iasyncenumerable((-0))-system-func((-0-system-boolean))-system-threading-cancellationtoken) + /// /// Returns an async-enumerable sequence containing an that represents how many elements in the specified async-enumerable sequence satisfy a condition. /// @@ -80,6 +85,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns an async-enumerable sequence containing a that represents the number of elements in the specified async-enumerable sequence that satisfy a condition. @@ -92,6 +98,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func or is null. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] + [Obsolete("Use LongCountAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the LongCountAwaitAsync functionality now exists as overloads of LongCountAsync.")] private static ValueTask LongCountAwaitAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) @@ -122,6 +129,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func LongCountAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) 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 6190d7043..a15dbd393 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 @@ -10,6 +10,16 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.maxasync?view=net-9.0-pp + // The method above has a slightly different signature: it takes a comparer. In cases where the cancellationToken + // has not been supplied, or has been passed by name, that method is source-compatible with this one. + // However, anyone calling this method with an unnamed cancellationToken argument will get an error because + // the comparer argument comes before the cancellationToken argument. There's not much we can do about + // this because if we continue to offer this method, it will result in ambiguous matches. The least bad + // option seems to be to hide this method, and anyone who was relying on it taking a positional + // cancellation token argument will need to deal with the compilation error. + /// /// Returns the maximum element in an async-enumerable sequence. /// @@ -95,6 +105,8 @@ static async ValueTask Core(IAsyncEnumerable source, Cancellat } } +#endif + /// /// Invokes a transform function on each element of a sequence and returns the maximum value. /// @@ -106,6 +118,7 @@ static async ValueTask Core(IAsyncEnumerable source, Cancellat /// A ValueTask containing a single element with the value that corresponds to the maximum element in the source sequence. /// or is null. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + [Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality previously provided by the MaxAsync overload that took a selector callback now exists as an overload of MaxByAsync.")] public static ValueTask MaxAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -196,6 +209,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func or is null. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] + [Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality previously provided by MaxAwaitAsync now exists as an overload of MaxByAsync.")] private static ValueTask MaxAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -277,6 +291,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MaxAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) 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 5075c5e48..617d5070b 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 @@ -10,6 +10,16 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.minasync?view=net-9.0-pp + // The method above has a slightly different signature: it takes a comparer. In cases where the cancellationToken + // has not been supplied, or has been passed by name, that method is source-compatible with this one. + // However, anyone calling this method with an unnamed cancellationToken argument will get an error because + // the comparer argument comes before the cancellationToken argument. There's not much we can do about + // this because if we continue to offer this method, it will result in ambiguous matches. The least bad + // option seems to be to hide this method, and anyone who was relying on it taking a positional + // cancellation token argument will need to deal with the compilation error. + /// /// Returns the minimum element in an async-enumerable sequence. /// @@ -96,6 +106,8 @@ static async ValueTask Core(IAsyncEnumerable source, Cancellat } } +#endif + /// /// Invokes a transform function on each element of a sequence and returns the minimum value. /// @@ -107,6 +119,7 @@ static async ValueTask Core(IAsyncEnumerable source, Cancellat /// A ValueTask sequence containing a single element with the value that corresponds to the minimum element in the source sequence. /// or is null. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + [Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality previously provided by the MinAsync overload that took a selector callback now exists as an overload of MinByAsync.")] public static ValueTask MinAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -198,6 +211,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func or is null. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] + [Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality previously provided by MinAwaitAsync now exists as an overload of MinByAsync.")] private static ValueTask MinAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -279,6 +293,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MinAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) 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 47d0052d7..68f9e205b 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 @@ -10,6 +10,7 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Returns the maximum value in an async-enumerable sequence of values. /// @@ -50,6 +51,7 @@ static async ValueTask Core(IAsyncEnumerable source, CancellationToken return value; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES public static ValueTask MaxAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { @@ -88,7 +90,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Returns the maximum value in an async-enumerable sequence. + /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// /// Type of elements in the source sequence. /// The source sequence. @@ -97,6 +99,7 @@ static async ValueTask Core(IAsyncEnumerable source, FuncA ValueTask containing the maximum value in the sequence. /// or is . [GenerateAsyncOverload] + [Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality previously provided by MaxAwaitAsync now exists as an overload of MaxByAsync.")] private static ValueTask MaxAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -135,6 +138,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MaxAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -172,6 +176,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the maximum value in an async-enumerable sequence of values. /// @@ -251,6 +256,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MaxAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { @@ -328,7 +334,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Returns the maximum value in an async-enumerable sequence. + /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// /// Type of elements in the source sequence. /// The source sequence. @@ -337,6 +343,7 @@ static async ValueTask Core(IAsyncEnumerable source, FuncA ValueTask containing the maximum value in the sequence. /// or is . [GenerateAsyncOverload] + [Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality previously provided by MaxAwaitAsync now exists as an overload of MaxByAsync.")] private static ValueTask MaxAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -414,6 +421,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MaxAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -490,6 +498,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the maximum value in an async-enumerable sequence of values. /// @@ -530,6 +539,7 @@ static async ValueTask Core(IAsyncEnumerable source, CancellationTok return value; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES public static ValueTask MaxAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { @@ -577,6 +587,7 @@ static async ValueTask Core(IAsyncEnumerable source, FuncA ValueTask containing the maximum value in the sequence. /// or is . [GenerateAsyncOverload] + [Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality previously provided by MaxAwaitAsync now exists as an overload of MaxByAsync.")] private static ValueTask MaxAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -615,6 +626,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MaxAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -652,6 +664,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the maximum value in an async-enumerable sequence of values. /// @@ -731,6 +744,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MaxAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { @@ -817,6 +831,7 @@ static async ValueTask Core(IAsyncEnumerable source, FuncA ValueTask containing the maximum value in the sequence. /// or is . [GenerateAsyncOverload] + [Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality previously provided by MaxAwaitAsync now exists as an overload of MaxByAsync.")] private static ValueTask MaxAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -894,6 +909,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MaxAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -970,6 +986,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the maximum value in an async-enumerable sequence of values. /// @@ -1025,6 +1042,7 @@ static async ValueTask Core(IAsyncEnumerable source, CancellationT return value; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES public static ValueTask MaxAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { @@ -1087,6 +1105,7 @@ static async ValueTask Core(IAsyncEnumerable source, FuncA ValueTask containing the maximum value in the sequence. /// or is . [GenerateAsyncOverload] + [Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality previously provided by MaxAwaitAsync now exists as an overload of MaxByAsync.")] private static ValueTask MaxAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -1140,6 +1159,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MaxAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -1192,6 +1212,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the maximum value in an async-enumerable sequence of values. /// @@ -1267,6 +1288,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MaxAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { @@ -1349,6 +1371,7 @@ static async ValueTask Core(IAsyncEnumerable source, FuncA ValueTask containing the maximum value in the sequence. /// or is . [GenerateAsyncOverload] + [Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality previously provided by MaxAwaitAsync now exists as an overload of MaxByAsync.")] private static ValueTask MaxAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -1422,6 +1445,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MaxAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -1494,6 +1518,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the maximum value in an async-enumerable sequence of values. /// @@ -1549,6 +1574,7 @@ static async ValueTask Core(IAsyncEnumerable source, Cancellatio return value; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES public static ValueTask MaxAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { @@ -1611,6 +1637,7 @@ static async ValueTask Core(IAsyncEnumerable source, FuncA ValueTask containing the maximum value in the sequence. /// or is . [GenerateAsyncOverload] + [Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality previously provided by MaxAwaitAsync now exists as an overload of MaxByAsync.")] private static ValueTask MaxAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -1664,6 +1691,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MaxAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -1716,6 +1744,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the maximum value in an async-enumerable sequence of values. /// @@ -1791,6 +1820,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MaxAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { @@ -1873,6 +1903,7 @@ static async ValueTask Core(IAsyncEnumerable source, FuncA ValueTask containing the maximum value in the sequence. /// or is . [GenerateAsyncOverload] + [Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality previously provided by MaxAwaitAsync now exists as an overload of MaxByAsync.")] private static ValueTask MaxAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -1946,6 +1977,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MaxAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -2018,6 +2050,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the maximum value in an async-enumerable sequence of values. /// @@ -2058,6 +2091,7 @@ static async ValueTask Core(IAsyncEnumerable source, Cancellat return value; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES public static ValueTask MaxAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { @@ -2105,6 +2139,7 @@ static async ValueTask Core(IAsyncEnumerable source, FuncA ValueTask containing the maximum value in the sequence. /// or is . [GenerateAsyncOverload] + [Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality previously provided by MaxAwaitAsync now exists as an overload of MaxByAsync.")] private static ValueTask MaxAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -2143,6 +2178,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MaxAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -2180,6 +2216,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the maximum value in an async-enumerable sequence of values. /// @@ -2233,6 +2270,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MaxAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { @@ -2293,6 +2331,7 @@ static async ValueTask Core(IAsyncEnumerable source, FuncA ValueTask containing the maximum value in the sequence. /// or is . [GenerateAsyncOverload] + [Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality previously provided by MaxAwaitAsync now exists as an overload of MaxByAsync.")] private static ValueTask MaxAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -2344,6 +2383,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MaxAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -2394,6 +2434,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the minimum value in an async-enumerable sequence of values. /// @@ -2434,6 +2475,7 @@ static async ValueTask Core(IAsyncEnumerable source, CancellationToken return value; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES public static ValueTask MinAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { @@ -2472,16 +2514,16 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Invokes and awaits a transform function on each element of a sequence and returns the minimum value. + /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// - /// The type of the elements in the source sequence. - /// An async-enumerable sequence to determine the minimum element of. - /// An asynchronous transform function to invoke and await on each element. - /// The optional cancellation token to be used for cancelling the sequence at any time. - /// A ValueTask sequence containing a single element with the value that corresponds to the minimum element in the source sequence. - /// or is null. - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + /// Type of elements in the source sequence. + /// The source sequence. + /// An asynchronous transform function to invoke and await on each element of the source. + /// The optional cancellation token to be usef for cancelling the sequence at any time. + /// A ValueTask containing the maximum value in the sequence. + /// or is . [GenerateAsyncOverload] + [Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality previously provided by MinAwaitAsync now exists as an overload of MinByAsync.")] private static ValueTask MinAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -2520,6 +2562,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MinAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -2557,6 +2600,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the minimum value in an async-enumerable sequence of values. /// @@ -2612,6 +2656,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MinAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { @@ -2665,16 +2710,16 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Invokes and awaits a transform function on each element of a sequence and returns the minimum value. + /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// - /// The type of the elements in the source sequence. - /// An async-enumerable sequence to determine the minimum element of. - /// An asynchronous transform function to invoke and await on each element. - /// The optional cancellation token to be used for cancelling the sequence at any time. - /// A ValueTask sequence containing a single element with the value that corresponds to the minimum element in the source sequence. - /// or is null. - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + /// Type of elements in the source sequence. + /// The source sequence. + /// An asynchronous transform function to invoke and await on each element of the source. + /// The optional cancellation token to be usef for cancelling the sequence at any time. + /// A ValueTask containing the maximum value in the sequence. + /// or is . [GenerateAsyncOverload] + [Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality previously provided by MinAwaitAsync now exists as an overload of MinByAsync.")] private static ValueTask MinAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -2728,6 +2773,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MinAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -2780,6 +2826,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the minimum value in an async-enumerable sequence of values. /// @@ -2820,6 +2867,7 @@ static async ValueTask Core(IAsyncEnumerable source, CancellationTok return value; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES public static ValueTask MinAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { @@ -2858,16 +2906,16 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Invokes and awaits a transform function on each element of a sequence and returns the minimum value. + /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// - /// The type of the elements in the source sequence. - /// An async-enumerable sequence to determine the minimum element of. - /// An asynchronous transform function to invoke and await on each element. - /// The optional cancellation token to be used for cancelling the sequence at any time. - /// A ValueTask sequence containing a single element with the value that corresponds to the minimum element in the source sequence. - /// or is null. - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + /// Type of elements in the source sequence. + /// The source sequence. + /// An asynchronous transform function to invoke and await on each element of the source. + /// The optional cancellation token to be usef for cancelling the sequence at any time. + /// A ValueTask containing the maximum value in the sequence. + /// or is . [GenerateAsyncOverload] + [Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality previously provided by MinAwaitAsync now exists as an overload of MinByAsync.")] private static ValueTask MinAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -2906,6 +2954,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MinAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -2943,6 +2992,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the minimum value in an async-enumerable sequence of values. /// @@ -2998,6 +3048,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MinAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { @@ -3051,16 +3102,16 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Invokes and awaits a transform function on each element of a sequence and returns the minimum value. + /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// - /// The type of the elements in the source sequence. - /// An async-enumerable sequence to determine the minimum element of. - /// An asynchronous transform function to invoke and await on each element. - /// The optional cancellation token to be used for cancelling the sequence at any time. - /// A ValueTask sequence containing a single element with the value that corresponds to the minimum element in the source sequence. - /// or is null. - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + /// Type of elements in the source sequence. + /// The source sequence. + /// An asynchronous transform function to invoke and await on each element of the source. + /// The optional cancellation token to be usef for cancelling the sequence at any time. + /// A ValueTask containing the maximum value in the sequence. + /// or is . [GenerateAsyncOverload] + [Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality previously provided by MinAwaitAsync now exists as an overload of MinByAsync.")] private static ValueTask MinAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -3114,6 +3165,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MinAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -3166,6 +3218,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the minimum value in an async-enumerable sequence of values. /// @@ -3222,6 +3275,7 @@ static async ValueTask Core(IAsyncEnumerable source, CancellationT return value; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES public static ValueTask MinAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { @@ -3276,16 +3330,16 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Invokes and awaits a transform function on each element of a sequence and returns the minimum value. + /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// - /// The type of the elements in the source sequence. - /// An async-enumerable sequence to determine the minimum element of. - /// An asynchronous transform function to invoke and await on each element. - /// The optional cancellation token to be used for cancelling the sequence at any time. - /// A ValueTask sequence containing a single element with the value that corresponds to the minimum element in the source sequence. - /// or is null. - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + /// Type of elements in the source sequence. + /// The source sequence. + /// An asynchronous transform function to invoke and await on each element of the source. + /// The optional cancellation token to be usef for cancelling the sequence at any time. + /// A ValueTask containing the maximum value in the sequence. + /// or is . [GenerateAsyncOverload] + [Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality previously provided by MinAwaitAsync now exists as an overload of MinByAsync.")] private static ValueTask MinAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -3340,6 +3394,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MinAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -3393,6 +3448,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the minimum value in an async-enumerable sequence of values. /// @@ -3464,6 +3520,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MinAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { @@ -3533,16 +3590,16 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Invokes and awaits a transform function on each element of a sequence and returns the minimum value. + /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// - /// The type of the elements in the source sequence. - /// An async-enumerable sequence to determine the minimum element of. - /// An asynchronous transform function to invoke and await on each element. - /// The optional cancellation token to be used for cancelling the sequence at any time. - /// A ValueTask sequence containing a single element with the value that corresponds to the minimum element in the source sequence. - /// or is null. - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + /// Type of elements in the source sequence. + /// The source sequence. + /// An asynchronous transform function to invoke and await on each element of the source. + /// The optional cancellation token to be usef for cancelling the sequence at any time. + /// A ValueTask containing the maximum value in the sequence. + /// or is . [GenerateAsyncOverload] + [Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality previously provided by MinAwaitAsync now exists as an overload of MinByAsync.")] private static ValueTask MinAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -3612,6 +3669,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MinAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -3680,6 +3738,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the minimum value in an async-enumerable sequence of values. /// @@ -3736,6 +3795,7 @@ static async ValueTask Core(IAsyncEnumerable source, Cancellatio return value; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES public static ValueTask MinAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { @@ -3790,16 +3850,16 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Invokes and awaits a transform function on each element of a sequence and returns the minimum value. + /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// - /// The type of the elements in the source sequence. - /// An async-enumerable sequence to determine the minimum element of. - /// An asynchronous transform function to invoke and await on each element. - /// The optional cancellation token to be used for cancelling the sequence at any time. - /// A ValueTask sequence containing a single element with the value that corresponds to the minimum element in the source sequence. - /// or is null. - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + /// Type of elements in the source sequence. + /// The source sequence. + /// An asynchronous transform function to invoke and await on each element of the source. + /// The optional cancellation token to be usef for cancelling the sequence at any time. + /// A ValueTask containing the maximum value in the sequence. + /// or is . [GenerateAsyncOverload] + [Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality previously provided by MinAwaitAsync now exists as an overload of MinByAsync.")] private static ValueTask MinAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -3854,6 +3914,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MinAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -3907,6 +3968,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the minimum value in an async-enumerable sequence of values. /// @@ -3978,6 +4040,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MinAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { @@ -4047,16 +4110,16 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Invokes and awaits a transform function on each element of a sequence and returns the minimum value. + /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// - /// The type of the elements in the source sequence. - /// An async-enumerable sequence to determine the minimum element of. - /// An asynchronous transform function to invoke and await on each element. - /// The optional cancellation token to be used for cancelling the sequence at any time. - /// A ValueTask sequence containing a single element with the value that corresponds to the minimum element in the source sequence. - /// or is null. - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + /// Type of elements in the source sequence. + /// The source sequence. + /// An asynchronous transform function to invoke and await on each element of the source. + /// The optional cancellation token to be usef for cancelling the sequence at any time. + /// A ValueTask containing the maximum value in the sequence. + /// or is . [GenerateAsyncOverload] + [Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality previously provided by MinAwaitAsync now exists as an overload of MinByAsync.")] private static ValueTask MinAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -4126,6 +4189,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MinAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -4194,6 +4258,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the minimum value in an async-enumerable sequence of values. /// @@ -4234,6 +4299,7 @@ static async ValueTask Core(IAsyncEnumerable source, Cancellat return value; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES public static ValueTask MinAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { @@ -4272,16 +4338,16 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Invokes and awaits a transform function on each element of a sequence and returns the minimum value. + /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// - /// The type of the elements in the source sequence. - /// An async-enumerable sequence to determine the minimum element of. - /// An asynchronous transform function to invoke and await on each element. - /// The optional cancellation token to be used for cancelling the sequence at any time. - /// A ValueTask sequence containing a single element with the value that corresponds to the minimum element in the source sequence. - /// or is null. - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + /// Type of elements in the source sequence. + /// The source sequence. + /// An asynchronous transform function to invoke and await on each element of the source. + /// The optional cancellation token to be usef for cancelling the sequence at any time. + /// A ValueTask containing the maximum value in the sequence. + /// or is . [GenerateAsyncOverload] + [Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality previously provided by MinAwaitAsync now exists as an overload of MinByAsync.")] private static ValueTask MinAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -4319,7 +4385,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func MinAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -4357,6 +4424,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the minimum value in an async-enumerable sequence of values. /// @@ -4410,6 +4478,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MinAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { @@ -4461,16 +4530,16 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Invokes and awaits a transform function on each element of a sequence and returns the minimum value. + /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// - /// The type of the elements in the source sequence. - /// An async-enumerable sequence to determine the minimum element of. - /// An asynchronous transform function to invoke and await on each element. - /// The optional cancellation token to be used for cancelling the sequence at any time. - /// A ValueTask sequence containing a single element with the value that corresponds to the minimum element in the source sequence. - /// or is null. - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + /// Type of elements in the source sequence. + /// The source sequence. + /// An asynchronous transform function to invoke and await on each element of the source. + /// The optional cancellation token to be usef for cancelling the sequence at any time. + /// A ValueTask containing the maximum value in the sequence. + /// or is . [GenerateAsyncOverload] + [Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality previously provided by MinAwaitAsync now exists as an overload of MinByAsync.")] private static ValueTask MinAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -4522,6 +4591,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MinAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) 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 95deebfc0..3e029a16c 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 @@ -33,6 +33,7 @@ foreach (var m in new[] { "Max", "Min" }) typeStr = "Nullable{" + t.Substring(0, 1).ToUpper() + t.Substring(1, t.Length - 2) + "}"; } #> +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Returns the <#=extremum#> value in an async-enumerable sequence of values. /// @@ -288,6 +289,7 @@ foreach (var m in new[] { "Max", "Min" }) #> } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES <# foreach (var overload in new[] { @@ -299,7 +301,7 @@ foreach (var overload in new[] { var isAsync = overload.invoke.StartsWith("await"); var isDeepCancellation = overload.selector.Contains("CancellationToken"); var suffix = isAsync ? "Await" : ""; - var visibility = isAsync ? "internal" : "public"; + var visibility = isAsync ? "private" : "public"; var core = isAsync ? "Core" : ""; if (isDeepCancellation) @@ -307,6 +309,27 @@ foreach (var overload in new[] { suffix += "WithCancellation"; #> #if !NO_DEEP_CANCELLATION + [GenerateAsyncOverload] +<# + } else if (isAsync) + { +#> + /// + /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. + /// + /// Type of elements in the source sequence. + /// The source sequence. + /// An asynchronous transform function to invoke and await on each element of the source. + /// The optional cancellation token to be usef for cancelling the sequence at any time. + /// A ValueTask containing the maximum value in the sequence. + /// or is . + [GenerateAsyncOverload] +<# + } + if (isDeepCancellation || isAsync) + { +#> + [Obsolete("Use <#=m#>ByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality previously provided by <#=m#><#=suffix#>Async now exists as an overload of <#=m#>ByAsync.")] <# } #> From 9d76a28abd735c3493b6d863e9604fa23e6ff5f6 Mon Sep 17 00:00:00 2001 From: Ian Griffiths Date: Tue, 30 Sep 2025 13:57:31 +0100 Subject: [PATCH 05/10] Handle remaining operators --- .../Linq/Operators/AsAsyncEnumerable.cs | 2 +- .../System/Linq/Operators/Disposables.cs | 23 + .../Operators/ToAsyncEnumerable.Observable.cs | 222 ++++++ .../Linq/Operators/ToAsyncEnumerable.Task.cs | 48 ++ .../System/Linq/Operators/ToObservable.cs | 83 +++ .../System.Interactive.Async/TaskExt.cs | 7 + .../AsyncOverloadsGenerator.cs | 2 +- .../System/Linq/Operators/MinMax.Generated.cs | 80 ++ .../System/Linq/Operators/MinMax.Generated.tt | 14 + .../System/Linq/Operators/OfType.cs | 6 + .../System/Linq/Operators/OrderBy.cs | 52 ++ .../System/Linq/Operators/Range.cs | 4 + .../System/Linq/Operators/Repeat.cs | 4 + .../System/Linq/Operators/Reverse.cs | 4 + .../System/Linq/Operators/Select.cs | 9 +- .../System/Linq/Operators/SelectMany.cs | 24 + .../System/Linq/Operators/SequenceEqual.cs | 5 + .../System/Linq/Operators/Single.cs | 8 + .../System/Linq/Operators/SingleOrDefault.cs | 8 + .../System/Linq/Operators/Skip.cs | 4 + .../System/Linq/Operators/SkipLast.cs | 4 + .../System/Linq/Operators/SkipWhile.cs | 10 + .../System/Linq/Operators/Sum.Generated.cs | 210 ++---- .../System/Linq/Operators/Sum.Generated.tt | 5 + .../System/Linq/Operators/Take.cs | 5 + .../System/Linq/Operators/TakeLast.cs | 5 + .../System/Linq/Operators/TakeWhile.cs | 10 + .../System/Linq/Operators/ToArray.cs | 4 + .../Operators/ToAsyncEnumerable.Observable.cs | 8 + .../Linq/Operators/ToAsyncEnumerable.Task.cs | 7 + .../System/Linq/Operators/ToDictionary.cs | 20 + .../System/Linq/Operators/ToEnumerable.cs | 1 + .../System/Linq/Operators/ToHashSet.cs | 5 + .../System/Linq/Operators/ToList.cs | 4 + .../System/Linq/Operators/ToLookup.cs | 18 + .../System/Linq/Operators/ToObservable.cs | 8 + .../System/Linq/Operators/Union.cs | 5 + .../System/Linq/Operators/Where.cs | 11 + .../System/Linq/Operators/Zip.cs | 19 + ...alTests.SystemInteractiveAsync.received.cs | 145 ++++ ...ystemInteractiveAsyncProviders.received.cs | 82 ++ ...iApprovalTests.SystemLinqAsync.received.cs | 703 ++++++++++++++++++ ...Tests.SystemLinqAsyncQueryable.received.cs | 413 ++++++++++ 43 files changed, 2167 insertions(+), 144 deletions(-) create mode 100644 Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Disposables.cs create mode 100644 Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/ToAsyncEnumerable.Observable.cs create mode 100644 Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/ToAsyncEnumerable.Task.cs create mode 100644 Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/ToObservable.cs create mode 100644 Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemInteractiveAsync.received.cs create mode 100644 Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemInteractiveAsyncProviders.received.cs create mode 100644 Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemLinqAsync.received.cs create mode 100644 Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemLinqAsyncQueryable.received.cs diff --git a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/AsAsyncEnumerable.cs b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/AsAsyncEnumerable.cs index b40187c52..8a5eb3af7 100644 --- a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/AsAsyncEnumerable.cs +++ b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/AsAsyncEnumerable.cs @@ -10,7 +10,7 @@ public static partial class AsyncEnumerableEx { // NB: Synchronous LINQ to Objects doesn't hide the implementation of the source either. - // Note: this was previous in System.Linq.Async, but since .NET 10.0's System.Linq.AsyncEnumerable chose not to + // Note: this was previously in System.Linq.Async, but since .NET 10.0's System.Linq.AsyncEnumerable chose not to // implement it (even though Enumerable.AsEnumerable exists), we moved it into System.Interactive.Async so that // it remains available even after developers remove their dependency on the deprecated System.Linq.Async. diff --git a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Disposables.cs b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Disposables.cs new file mode 100644 index 000000000..e256e2017 --- /dev/null +++ b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Disposables.cs @@ -0,0 +1,23 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT License. +// See the LICENSE file in the project root for more information. + +using System.Threading; + +namespace System.Linq +{ + internal sealed class CancellationTokenDisposable : IDisposable + { + private readonly CancellationTokenSource _cts = new(); + + public CancellationToken Token => _cts.Token; + + public void Dispose() + { + if (!_cts.IsCancellationRequested) + { + _cts.Cancel(); + } + } + } +} diff --git a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/ToAsyncEnumerable.Observable.cs b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/ToAsyncEnumerable.Observable.cs new file mode 100644 index 000000000..5506aeffc --- /dev/null +++ b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/ToAsyncEnumerable.Observable.cs @@ -0,0 +1,222 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT License. +// See the LICENSE file in the project root for more information. + +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +namespace System.Linq +{ + public static partial class AsyncEnumerableEx + { + /// + /// Converts an observable sequence to an async-enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// Observable sequence to convert to an async-enumerable sequence. + /// The async-enumerable sequence whose elements are pulled from the given observable sequence. + /// is null. + public static IAsyncEnumerable ToAsyncEnumerable(this IObservable source) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + + return new ObservableAsyncEnumerable(source); + } + + private sealed class ObservableAsyncEnumerable : AsyncIterator, IObserver + { + private readonly IObservable _source; + + private ConcurrentQueue? _values = new(); + private Exception? _error; + private bool _completed; + private TaskCompletionSource? _signal; + private IDisposable? _subscription; + private CancellationTokenRegistration _ctr; + + public ObservableAsyncEnumerable(IObservable source) => _source = source; + + public override AsyncIteratorBase Clone() => new ObservableAsyncEnumerable(_source); + + public override ValueTask DisposeAsync() + { + Dispose(); + + return base.DisposeAsync(); + } + + protected override async ValueTask MoveNextCore() + { + // + // REVIEW: How often should we check? At the very least, we want to prevent + // subscribing if cancellation is requested. A case may be made to + // check for each iteration, namely because this operator is a bridge + // with another interface. However, we also wire up cancellation to + // the observable subscription, so there's redundancy here. + // + _cancellationToken.ThrowIfCancellationRequested(); + + switch (_state) + { + case AsyncIteratorState.Allocated: + // + // NB: Breaking change to align with lazy nature of async iterators. + // + // In previous implementations, the Subscribe call happened during + // the call to GetAsyncEnumerator. + // + // REVIEW: Confirm this design point. This implementation is compatible + // with an async iterator using "yield return", e.g. subscribing + // to the observable sequence and yielding values out of a local + // queue filled by observer callbacks. However, it departs from + // the dual treatment of Subscribe/GetEnumerator. + // + + _subscription = _source.Subscribe(this); + _ctr = _cancellationToken.Register(OnCanceled, state: null); + _state = AsyncIteratorState.Iterating; + goto case AsyncIteratorState.Iterating; + + case AsyncIteratorState.Iterating: + while (true) + { + var completed = Volatile.Read(ref _completed); + + if (_values!.TryDequeue(out _current!)) + { + return true; + } + else if (completed) + { + var error = _error; + + if (error != null) + { + throw error; + } + + return false; + } + + await Resume().ConfigureAwait(false); + Volatile.Write(ref _signal, null); + } + } + + await DisposeAsync().ConfigureAwait(false); + return false; + } + + public void OnCompleted() + { + Volatile.Write(ref _completed, true); + + DisposeSubscription(); + OnNotification(); + } + + public void OnError(Exception error) + { + _error = error; + Volatile.Write(ref _completed, true); + + DisposeSubscription(); + OnNotification(); + } + + public void OnNext(TSource value) + { + _values?.Enqueue(value); + + OnNotification(); + } + + private void OnNotification() + { + while (true) + { + var signal = Volatile.Read(ref _signal); + + if (signal == TaskExt.True) + { + return; + } + + if (signal != null) + { + signal.TrySetResult(true); + return; + } + + if (Interlocked.CompareExchange(ref _signal, TaskExt.True, null) == null) + { + return; + } + } + } + + private void Dispose() + { + _ctr.Dispose(); + DisposeSubscription(); + + _values = null; + _error = null; + } + + private void DisposeSubscription() => Interlocked.Exchange(ref _subscription, null)?.Dispose(); + + private void OnCanceled(object? state) + { + var cancelledTcs = default(TaskCompletionSource); + + Dispose(); + + while (true) + { + var signal = Volatile.Read(ref _signal); + + if (signal != null) + { + if (signal.TrySetCanceled(_cancellationToken)) + return; + } + + if (cancelledTcs == null) + { + cancelledTcs = new TaskCompletionSource(); + cancelledTcs.TrySetCanceled(_cancellationToken); + } + + if (Interlocked.CompareExchange(ref _signal, cancelledTcs, signal) == signal) + return; + } + } + + private Task Resume() + { + TaskCompletionSource? newSignal = null; + + while (true) + { + var signal = Volatile.Read(ref _signal); + + if (signal != null) + { + return signal.Task; + } + + newSignal ??= new TaskCompletionSource(); + + if (Interlocked.CompareExchange(ref _signal, newSignal, null) == null) + { + return newSignal.Task; + } + } + } + } + } +} diff --git a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/ToAsyncEnumerable.Task.cs b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/ToAsyncEnumerable.Task.cs new file mode 100644 index 000000000..af1914347 --- /dev/null +++ b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/ToAsyncEnumerable.Task.cs @@ -0,0 +1,48 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT License. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace System.Linq +{ + public static partial class AsyncEnumerableEx + { + /// + /// Converts a task to an async-enumerable sequence. + /// + /// The type of the elements in the source task. + /// Task to convert to an async-enumerable sequence. + /// The async-enumerable sequence whose element is pulled from the given task. + /// is null. + public static IAsyncEnumerable ToAsyncEnumerable(this Task task) + { + if (task == null) + throw Error.ArgumentNull(nameof(task)); + + return new TaskToAsyncEnumerable(task); + } + + private sealed class TaskToAsyncEnumerable : AsyncIterator + { + private readonly Task _task; + + public TaskToAsyncEnumerable(Task task) => _task = task; + + public override AsyncIteratorBase Clone() => new TaskToAsyncEnumerable(_task); + + protected override async ValueTask MoveNextCore() + { + if (_state == AsyncIteratorState.Allocated) + { + _state = AsyncIteratorState.Iterating; + _current = await _task.ConfigureAwait(false); + return true; + } + + return false; + } + } + } +} diff --git a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/ToObservable.cs b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/ToObservable.cs new file mode 100644 index 000000000..5be39166b --- /dev/null +++ b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/ToObservable.cs @@ -0,0 +1,83 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT License. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; + +namespace System.Linq +{ + public static partial class AsyncEnumerableEx + { + /// + /// Converts an async-enumerable sequence to an observable sequence. + /// + /// The type of the elements in the source sequence. + /// Enumerable sequence to convert to an observable sequence. + /// The observable sequence whose elements are pulled from the given enumerable sequence. + /// is null. + public static IObservable ToObservable(this IAsyncEnumerable source) + { + if (source == null) + throw Error.ArgumentNull(nameof(source)); + + return new ToObservableObservable(source); + } + + private sealed class ToObservableObservable : IObservable + { + private readonly IAsyncEnumerable _source; + + public ToObservableObservable(IAsyncEnumerable source) + { + _source = source; + } + + public IDisposable Subscribe(IObserver observer) + { + var ctd = new CancellationTokenDisposable(); + + async void Core() + { + await using var e = _source.GetAsyncEnumerator(ctd.Token); + do + { + bool hasNext; + var value = default(T)!; + + try + { + hasNext = await e.MoveNextAsync().ConfigureAwait(false); + if (hasNext) + { + value = e.Current; + } + } + catch (Exception ex) + { + if (!ctd.Token.IsCancellationRequested) + { + observer.OnError(ex); + } + + return; + } + + if (!hasNext) + { + observer.OnCompleted(); + return; + } + + observer.OnNext(value); + } + while (!ctd.Token.IsCancellationRequested); + } + + // Fire and forget + Core(); + + return ctd; + } + } + } +} diff --git a/Ix.NET/Source/System.Interactive.Async/TaskExt.cs b/Ix.NET/Source/System.Interactive.Async/TaskExt.cs index 18a0dee75..200cd6d9d 100644 --- a/Ix.NET/Source/System.Interactive.Async/TaskExt.cs +++ b/Ix.NET/Source/System.Interactive.Async/TaskExt.cs @@ -11,6 +11,13 @@ namespace System.Threading.Tasks internal static class TaskExt { public static readonly Task Never = new TaskCompletionSource().Task; + public static readonly TaskCompletionSource True; + + static TaskExt() + { + True = new TaskCompletionSource(); + True.SetResult(true); + } #if USE_FAIR_AND_CHEAPER_MERGE public static WhenAnyValueTask WhenAny(ValueTask[] tasks) diff --git a/Ix.NET/Source/System.Linq.Async.SourceGenerator/AsyncOverloadsGenerator.cs b/Ix.NET/Source/System.Linq.Async.SourceGenerator/AsyncOverloadsGenerator.cs index 6300d4b99..656072265 100644 --- a/Ix.NET/Source/System.Linq.Async.SourceGenerator/AsyncOverloadsGenerator.cs +++ b/Ix.NET/Source/System.Linq.Async.SourceGenerator/AsyncOverloadsGenerator.cs @@ -63,7 +63,7 @@ private static string GenerateOverloads(AsyncMethodGrouping grouping, Generation // to offer these even though we're decprecating System.Linq.Async, so they migrate into // System.Interactive.Async.) In those cases, the containing type is typically AsyncEnumerableEx, // but in System.Linq.Async it is AsyncEnumerable. So we need to discover the containing type name. - var containingTypeName = grouping.Methods.First().Symbol.ContainingType.Name; + var containingTypeName = grouping.Methods.FirstOrDefault()?.Symbol.ContainingType.Name ?? "AsyncEnumerable"; var overloads = new StringBuilder(); overloads.AppendLine("#nullable enable"); 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 68f9e205b..1ddb0773a 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 @@ -53,6 +53,7 @@ static async ValueTask Core(IAsyncEnumerable source, CancellationToken } #endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES public static ValueTask MaxAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -89,6 +90,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// @@ -176,6 +179,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the maximum value in an async-enumerable sequence of values. @@ -258,6 +262,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MaxAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -333,6 +338,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// @@ -498,6 +505,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the maximum value in an async-enumerable sequence of values. @@ -541,6 +549,7 @@ static async ValueTask Core(IAsyncEnumerable source, CancellationTok } #endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES public static ValueTask MaxAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -577,6 +586,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// @@ -664,6 +675,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the maximum value in an async-enumerable sequence of values. @@ -746,6 +758,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MaxAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -821,6 +834,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// @@ -986,6 +1001,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the maximum value in an async-enumerable sequence of values. @@ -1044,6 +1060,7 @@ static async ValueTask Core(IAsyncEnumerable source, CancellationT } #endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES public static ValueTask MaxAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -1095,6 +1112,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// @@ -1212,6 +1231,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the maximum value in an async-enumerable sequence of values. @@ -1290,6 +1310,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MaxAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -1361,6 +1382,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// @@ -1518,6 +1541,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the maximum value in an async-enumerable sequence of values. @@ -1576,6 +1600,7 @@ static async ValueTask Core(IAsyncEnumerable source, Cancellatio } #endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES public static ValueTask MaxAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -1627,6 +1652,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// @@ -1744,6 +1771,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the maximum value in an async-enumerable sequence of values. @@ -1822,6 +1850,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MaxAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -1893,6 +1922,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// @@ -2050,6 +2081,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the maximum value in an async-enumerable sequence of values. @@ -2093,6 +2125,7 @@ static async ValueTask Core(IAsyncEnumerable source, Cancellat } #endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES public static ValueTask MaxAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -2129,6 +2162,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// @@ -2216,6 +2251,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the maximum value in an async-enumerable sequence of values. @@ -2272,6 +2308,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MaxAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -2321,6 +2358,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// @@ -2434,6 +2473,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the minimum value in an async-enumerable sequence of values. @@ -2477,6 +2517,7 @@ static async ValueTask Core(IAsyncEnumerable source, CancellationToken } #endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES public static ValueTask MinAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -2513,6 +2554,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// @@ -2600,6 +2643,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the minimum value in an async-enumerable sequence of values. @@ -2658,6 +2702,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MinAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -2709,6 +2754,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// @@ -2826,6 +2873,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the minimum value in an async-enumerable sequence of values. @@ -2869,6 +2917,7 @@ static async ValueTask Core(IAsyncEnumerable source, CancellationTok } #endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES public static ValueTask MinAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -2905,6 +2954,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// @@ -2992,6 +3043,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the minimum value in an async-enumerable sequence of values. @@ -3050,6 +3102,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MinAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -3101,6 +3154,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// @@ -3218,6 +3273,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the minimum value in an async-enumerable sequence of values. @@ -3277,6 +3333,7 @@ static async ValueTask Core(IAsyncEnumerable source, CancellationT } #endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES public static ValueTask MinAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -3329,6 +3386,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// @@ -3448,6 +3507,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the minimum value in an async-enumerable sequence of values. @@ -3522,6 +3582,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MinAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -3589,6 +3650,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// @@ -3738,6 +3801,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the minimum value in an async-enumerable sequence of values. @@ -3797,6 +3861,7 @@ static async ValueTask Core(IAsyncEnumerable source, Cancellatio } #endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES public static ValueTask MinAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -3849,6 +3914,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// @@ -3968,6 +4035,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the minimum value in an async-enumerable sequence of values. @@ -4042,6 +4110,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MinAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -4109,6 +4178,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// @@ -4258,6 +4329,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the minimum value in an async-enumerable sequence of values. @@ -4301,6 +4373,7 @@ static async ValueTask Core(IAsyncEnumerable source, Cancellat } #endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES public static ValueTask MinAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -4337,6 +4410,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// @@ -4424,6 +4499,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the minimum value in an async-enumerable sequence of values. @@ -4480,6 +4556,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func MinAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -4529,6 +4606,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Invokes and awaits a transform function on each element of a sequence and returns the maximum value. /// @@ -4642,5 +4721,6 @@ static async ValueTask Core(IAsyncEnumerable source, Func [Obsolete("Use <#=m#>ByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality previously provided by <#=m#><#=suffix#>Async now exists as an overload of <#=m#>ByAsync.")] +<# + } else { +#> +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES <# } + #> <#=visibility#> static ValueTask<<#=t#>> <#=m#><#=suffix#>Async<#=core#>(this IAsyncEnumerable source, <#=overload.selector#> selector, CancellationToken cancellationToken = default) { @@ -589,6 +594,15 @@ foreach (var overload in new[] { { #> #endif + +<# + } + + if (!(isDeepCancellation || isAsync)) + { +#> +#endif + <# } } diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/OfType.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/OfType.cs index b9e2bb476..bbd94d939 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/OfType.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/OfType.cs @@ -17,6 +17,11 @@ public static partial class AsyncEnumerable // the source is not an option, because it would require users to specify two type arguments, unlike // what's done in Enumerable.OfType. Should we move this method to Ix, thus doing away with OfType // in the API surface altogether? + // IDG 2025/09/30: System.Linq.AsyncEnumerable implemented this one despite the limitations (and despite + // not implementing AsAsyncEnumerable). + +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.oftype?view=net-9.0-pp /// /// Filters the elements of an async-enumerable sequence based on the specified type. @@ -43,5 +48,6 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, [S } } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } } 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 5d16689bd..5d431b5a2 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 @@ -11,6 +11,10 @@ namespace System.Linq #if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.orderby?view=net-9.0-pp#system-linq-asyncenumerable-orderby-2(system-collections-generic-iasyncenumerable((-0))-system-func((-0-1))-system-collections-generic-icomparer((-1))) + // The method linked to above includes a comparer parameter with a default value of null. + /// /// Sorts the elements of a sequence in ascending order according to a key. /// @@ -22,6 +26,7 @@ public static partial class AsyncEnumerable /// or is null. public static IOrderedAsyncEnumerable OrderBy(this IAsyncEnumerable source, Func keySelector) => new OrderedAsyncEnumerable(source, keySelector, comparer: null, descending: false, parent: null); +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Sorts the elements of a sequence in ascending order according to a key obtained by invoking a transform function on each element and awaiting the result. @@ -33,15 +38,20 @@ public static IOrderedAsyncEnumerable OrderBy(this IAsyn /// An ordered async-enumerable sequence whose elements are sorted according to a key. /// or is null. [GenerateAsyncOverload] + [Obsolete("Use OrderBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the OrderByAwait functionality now exists as overloads of OrderBy.")] private static IOrderedAsyncEnumerable OrderByAwaitCore(this IAsyncEnumerable source, Func> keySelector) => new OrderedAsyncEnumerableWithTask(source, keySelector, comparer: null, descending: false, parent: null); #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use OrderBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the OrderByAwaitWithCancellation functionality now exists as overloads of OrderBy.")] private static IOrderedAsyncEnumerable OrderByAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector) => new OrderedAsyncEnumerableWithTaskAndCancellation(source, keySelector, comparer: null, descending: false, parent: null); #endif +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.orderby?view=net-9.0-pp#system-linq-asyncenumerable-orderby-2(system-collections-generic-iasyncenumerable((-0))-system-func((-0-1))-system-collections-generic-icomparer((-1))) + /// /// Sorts the elements of a sequence in ascending order by using a specified comparer. /// @@ -54,6 +64,7 @@ private static IOrderedAsyncEnumerable OrderByAwaitWithCancellationCore /// or is null. public static IOrderedAsyncEnumerable OrderBy(this IAsyncEnumerable source, Func keySelector, IComparer comparer) => new OrderedAsyncEnumerable(source, keySelector, comparer, descending: false, parent: null); +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Sorts the elements of a sequence in ascending order by using a specified comparer. The keys are obtained by invoking the transform function on each element and awaiting the result. @@ -66,15 +77,21 @@ public static IOrderedAsyncEnumerable OrderBy(this IAsyn /// An ordered async-enumerable sequence whose elements are sorted according to a key. /// or is null. [GenerateAsyncOverload] + [Obsolete("Use OrderBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the OrderByAwait functionality now exists as overloads of OrderBy.")] private static IOrderedAsyncEnumerable OrderByAwaitCore(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => new OrderedAsyncEnumerableWithTask(source, keySelector, comparer, descending: false, parent: null); #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use OrderBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the OrderByAwaitWithCancellation functionality now exists as overloads of OrderBy.")] private static IOrderedAsyncEnumerable OrderByAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => new OrderedAsyncEnumerableWithTaskAndCancellation(source, keySelector, comparer, descending: false, parent: null); #endif +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.orderbydescending?view=net-9.0-pp#system-linq-asyncenumerable-orderbydescending-2(system-collections-generic-iasyncenumerable((-0))-system-func((-0-1))-system-collections-generic-icomparer((-1))) + // The method linked to above includes a comparer parameter with a default value of null. + /// /// Sorts the elements of a sequence in descending order according to a key. /// @@ -86,6 +103,7 @@ private static IOrderedAsyncEnumerable OrderByAwaitWithCancellationCore /// or is null. public static IOrderedAsyncEnumerable OrderByDescending(this IAsyncEnumerable source, Func keySelector) => new OrderedAsyncEnumerable(source, keySelector, comparer: null, descending: true, parent: null); +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Sorts the elements of a sequence in descending order according to a key obtained by invoking a transform function on each element and awaiting the result. @@ -97,15 +115,20 @@ public static IOrderedAsyncEnumerable OrderByDescending( /// An ordered async-enumerable sequence whose elements are sorted in descending order according to a key. /// or is null. [GenerateAsyncOverload] + [Obsolete("Use OrderByDescending. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the OrderByDescendingAwait functionality now exists as overloads of OrderByDescending.")] private static IOrderedAsyncEnumerable OrderByDescendingAwaitCore(this IAsyncEnumerable source, Func> keySelector) => new OrderedAsyncEnumerableWithTask(source, keySelector, comparer: null, descending: true, parent: null); #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use OrderByDescending. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the OrderByDescendingAwaitWithCancellation functionality now exists as overloads of OrderByDescending.")] private static IOrderedAsyncEnumerable OrderByDescendingAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector) => new OrderedAsyncEnumerableWithTaskAndCancellation(source, keySelector, comparer: null, descending: true, parent: null); #endif +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.orderbydescending?view=net-9.0-pp#system-linq-asyncenumerable-orderbydescending-2(system-collections-generic-iasyncenumerable((-0))-system-func((-0-1))-system-collections-generic-icomparer((-1))) + /// /// Sorts the elements of a sequence in descending order by using a specified comparer. /// @@ -118,6 +141,7 @@ private static IOrderedAsyncEnumerable OrderByDescendingAwaitWithCancel /// or is null. public static IOrderedAsyncEnumerable OrderByDescending(this IAsyncEnumerable source, Func keySelector, IComparer comparer) => new OrderedAsyncEnumerable(source, keySelector, comparer, descending: true, parent: null); +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Sorts the elements of a sequence in descending order by using a specified comparer. The keys are obtained by invoking the transform function on each element and awaiting the result. @@ -130,15 +154,21 @@ public static IOrderedAsyncEnumerable OrderByDescending( /// An ordered async-enumerable sequence whose elements are sorted in descending order according to a key. /// or is null. [GenerateAsyncOverload] + [Obsolete("Use OrderByDescending. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the OrderByDescendingAwait functionality now exists as overloads of OrderByDescending.")] private static IOrderedAsyncEnumerable OrderByDescendingAwaitCore(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => new OrderedAsyncEnumerableWithTask(source, keySelector, comparer, descending: true, parent: null); #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use OrderByDescending. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the OrderByDescendingAwaitWithCancellation functionality now exists as overloads of OrderByDescending.")] private static IOrderedAsyncEnumerable OrderByDescendingAwaitWithCancellationCore(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => new OrderedAsyncEnumerableWithTaskAndCancellation(source, keySelector, comparer, descending: true, parent: null); #endif +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.thenby?view=net-9.0-pp#system-linq-asyncenumerable-thenby-2(system-linq-iorderedasyncenumerable((-0))-system-func((-0-1))-system-collections-generic-icomparer((-1))) + // The method linked to above includes a comparer parameter with a default value of null. + /// /// Performs a subsequent ordering of the elements in a sequence in ascending order according to a key. /// @@ -155,6 +185,7 @@ public static IOrderedAsyncEnumerable ThenBy(this IOrder return source.CreateOrderedEnumerable(keySelector, comparer: null, descending: false); } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Performs a subsequent ordering of the elements in a sequence in ascending order according to a key obtained by invoking a transform function on each element and awaiting the result. @@ -166,6 +197,7 @@ public static IOrderedAsyncEnumerable ThenBy(this IOrder /// An ordered async-enumerable whose elements are sorted according to a key. /// or is null. [GenerateAsyncOverload] + [Obsolete("Use ThenBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ThenByAwait functionality now exists as overloads of ThenBy.")] private static IOrderedAsyncEnumerable ThenByAwaitCore(this IOrderedAsyncEnumerable source, Func> keySelector) { if (source == null) @@ -176,6 +208,7 @@ private static IOrderedAsyncEnumerable ThenByAwaitCore(t #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use ThenBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ThenByAwaitWithCancellation functionality now exists as overloads of ThenBy.")] private static IOrderedAsyncEnumerable ThenByAwaitWithCancellationCore(this IOrderedAsyncEnumerable source, Func> keySelector) { if (source == null) @@ -185,6 +218,9 @@ private static IOrderedAsyncEnumerable ThenByAwaitWithCancellationCore< } #endif +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.thenby?view=net-9.0-pp#system-linq-asyncenumerable-thenby-2(system-linq-iorderedasyncenumerable((-0))-system-func((-0-1))-system-collections-generic-icomparer((-1))) + /// /// Performs a subsequent ordering of the elements in a sequence in ascending order by using a specified comparer. /// @@ -202,6 +238,7 @@ public static IOrderedAsyncEnumerable ThenBy(this IOrder return source.CreateOrderedEnumerable(keySelector, comparer, descending: false); } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Performs a subsequent ordering of the elements in a sequence in ascending order by using a specified comparer. The keys are obtained by invoking a transform function on each element and awaiting the result. @@ -214,6 +251,7 @@ public static IOrderedAsyncEnumerable ThenBy(this IOrder /// An ordered async-enumerable whose elements are sorted according to a key. /// or is null. [GenerateAsyncOverload] + [Obsolete("Use ThenBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ThenByAwait functionality now exists as overloads of ThenBy.")] private static IOrderedAsyncEnumerable ThenByAwaitCore(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) { if (source == null) @@ -224,6 +262,7 @@ private static IOrderedAsyncEnumerable ThenByAwaitCore(t #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use ThenBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ThenByAwaitWithCancellation functionality now exists as overloads of ThenBy.")] private static IOrderedAsyncEnumerable ThenByAwaitWithCancellationCore(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) { if (source == null) @@ -233,6 +272,10 @@ private static IOrderedAsyncEnumerable ThenByAwaitWithCancellationCore< } #endif +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.thenbydescending?view=net-9.0-pp#system-linq-asyncenumerable-thenbydescending-2(system-linq-iorderedasyncenumerable((-0))-system-func((-0-1))-system-collections-generic-icomparer((-1))) + // The method linked to above includes a comparer parameter with a default value of null. + /// /// Performs a subsequent ordering of the elements in a sequence in descending order, according to a key. /// @@ -249,6 +292,7 @@ public static IOrderedAsyncEnumerable ThenByDescending(t return source.CreateOrderedEnumerable(keySelector, comparer: null, descending: true); } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Performs a subsequent ordering of the elements in a sequence in descending order, according to a key obtained by invoking a transform function on each element and awaiting the result. @@ -260,6 +304,7 @@ public static IOrderedAsyncEnumerable ThenByDescending(t /// An ordered async-enumerable sequence whose elements are sorted in descending order according to a key. /// or is null. [GenerateAsyncOverload] + [Obsolete("Use ThenByDescending. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ThenByDescendingAwait functionality now exists as overloads of ThenByDescending.")] private static IOrderedAsyncEnumerable ThenByDescendingAwaitCore(this IOrderedAsyncEnumerable source, Func> keySelector) { if (source == null) @@ -270,6 +315,7 @@ private static IOrderedAsyncEnumerable ThenByDescendingAwaitCore ThenByDescendingAwaitWithCancellationCore(this IOrderedAsyncEnumerable source, Func> keySelector) { if (source == null) @@ -279,6 +325,9 @@ private static IOrderedAsyncEnumerable ThenByDescendingAwaitWithCancell } #endif +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.thenbydescending?view=net-9.0-pp#system-linq-asyncenumerable-thenbydescending-2(system-linq-iorderedasyncenumerable((-0))-system-func((-0-1))-system-collections-generic-icomparer((-1))) + /// /// Performs a subsequent ordering of the elements in a sequence in descending order by using a specified comparer. /// @@ -296,6 +345,7 @@ public static IOrderedAsyncEnumerable ThenByDescending(t return source.CreateOrderedEnumerable(keySelector, comparer, descending: true); } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Performs a subsequent ordering of the elements in a sequence in descending order by using a specified comparer. The keys are obtained by invoking a transform function on each element and awaiting the result. @@ -308,6 +358,7 @@ public static IOrderedAsyncEnumerable ThenByDescending(t /// An ordered async-enumerable sequence whose elements are sorted in descending order according to a key. /// or is null. [GenerateAsyncOverload] + [Obsolete("Use ThenByDescending. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ThenByDescendingAwait functionality now exists as overloads of ThenByDescending.")] private static IOrderedAsyncEnumerable ThenByDescendingAwaitCore(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) { if (source == null) @@ -318,6 +369,7 @@ private static IOrderedAsyncEnumerable ThenByDescendingAwaitCore ThenByDescendingAwaitWithCancellationCore(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Range.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Range.cs index 013a1b00a..77bf5a21b 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Range.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Range.cs @@ -11,6 +11,9 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.range?view=net-9.0-pp + /// /// Generates an async-enumerable sequence of integral numbers within a specified range. /// @@ -144,5 +147,6 @@ async ValueTask Core() } } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } } diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Repeat.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Repeat.cs index b89feb64c..45f12bace 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Repeat.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Repeat.cs @@ -10,6 +10,9 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.repeat?view=net-9.0-pp + /// /// Generates an async-enumerable sequence that repeats the given element the specified number of times. /// @@ -99,5 +102,6 @@ protected override async ValueTask MoveNextCore() return false; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } } diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Reverse.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Reverse.cs index 13f314d23..54732b0d1 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Reverse.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Reverse.cs @@ -11,6 +11,9 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.reverse?view=net-9.0-pp + /// /// Inverts the order of the elements in a sequence. /// @@ -115,5 +118,6 @@ protected override async ValueTask MoveNextCore() return false; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } } 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 ff8383c30..493882c47 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 @@ -36,7 +36,8 @@ public static IAsyncEnumerable Select(this IAsyncEnum _ => new SelectEnumerableAsyncIterator(source, selector), }; } -#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.select?view=net-9.0-pp#system-linq-asyncenumerable-select-2(system-collections-generic-iasyncenumerable((-0))-system-func((-0-system-int32-1))) /// /// Projects each element of an async-enumerable sequence into a new form by incorporating the element's index. @@ -71,6 +72,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu } } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Projects each element of an async-enumerable sequence into a new form by applying an asynchronous selector function to each member of the source sequence and awaiting the result. @@ -82,7 +84,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu /// An async-enumerable sequence whose elements are the result of invoking the transform function on each element of the source sequence and awaiting the result. /// or is null. [GenerateAsyncOverload] - [Obsolete("Use Aggregate. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the AggregateAwait and AggregateAwaitWithCancellationAsync functionality now exists as overloads of Aggregate.")] + [Obsolete("Use Select. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the SelectAwait functionality now exists as overloads of Select.")] private static IAsyncEnumerable SelectAwaitCore(this IAsyncEnumerable source, Func> selector) { if (source == null) @@ -100,6 +102,7 @@ private static IAsyncEnumerable SelectAwaitCore(this #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use Select. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the SelectAwaitWithCancellation functionality now exists as overloads of Select.")] private static IAsyncEnumerable SelectAwaitWithCancellationCore(this IAsyncEnumerable source, Func> selector) { if (source == null) @@ -126,6 +129,7 @@ private static IAsyncEnumerable SelectAwaitWithCancellationCoreAn async-enumerable sequence whose elements are the result of invoking the transform function on each element and its index of the source sequence and awaiting the result. /// or is null. [GenerateAsyncOverload] + [Obsolete("Use Select. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the SelectAwait functionality now exists as overloads of Select.")] private static IAsyncEnumerable SelectAwaitCore(this IAsyncEnumerable source, Func> selector) { if (source == null) @@ -153,6 +157,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use Select. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the SelectAwaitWithCancellation functionality now exists as overloads of Select.")] private static IAsyncEnumerable SelectAwaitWithCancellationCore(this IAsyncEnumerable source, Func> selector) { if (source == null) 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 e70b194cf..0b0d190c8 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 @@ -10,6 +10,9 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.selectmany?view=net-9.0-pp#system-linq-asyncenumerable-selectmany-3(system-collections-generic-iasyncenumerable((-0))-system-func((-0-system-collections-generic-iasyncenumerable((-1))))-system-func((-0-1-2))) + /// /// Projects each element of an async-enumerable sequence to an async-enumerable sequence and merges the resulting async-enumerable sequences into one async-enumerable sequence. /// @@ -28,6 +31,7 @@ public static IAsyncEnumerable SelectMany(this IAsync return new SelectManyAsyncIterator(source, selector); } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES // REVIEW: Should we keep these overloads that return ValueTask>? One could argue the selector is async twice. @@ -41,6 +45,7 @@ public static IAsyncEnumerable SelectMany(this IAsync /// An async-enumerable sequence whose elements are the result of invoking the one-to-many transform function on each element of the source sequence and awaiting the result. /// or is null. [GenerateAsyncOverload] + [Obsolete("Use SelectMany. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the SelectManyAwait functionality now exists as overloads of SelectMany.")] private static IAsyncEnumerable SelectManyAwaitCore(this IAsyncEnumerable source, Func>> selector) { if (source == null) @@ -53,6 +58,7 @@ private static IAsyncEnumerable SelectManyAwaitCore(t #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use SelectMany. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the SelectManyAwaitWithCancellation functionality now exists as overloads of SelectMany.")] private static IAsyncEnumerable SelectManyAwaitWithCancellationCore(this IAsyncEnumerable source, Func>> selector) { if (source == null) @@ -64,6 +70,9 @@ private static IAsyncEnumerable SelectManyAwaitWithCancellationCore /// Projects each element of an async-enumerable sequence to an async-enumerable sequence by incorporating the element's index and merges the resulting async-enumerable sequences into one async-enumerable sequence. /// @@ -102,6 +111,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu } } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Projects each element of an async-enumerable sequence into an async-enumerable sequence by incorporating the element's index and merges the resulting async-enumerable sequences into an async-enumerable sequence. @@ -113,6 +123,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu /// An async-enumerable sequence who's elements are the result of invoking the one-to-many transform function on each element of the source sequence and awaiting the result. /// or is null. [GenerateAsyncOverload] + [Obsolete("Use SelectMany. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the SelectManyAwait functionality now exists as overloads of SelectMany.")] private static IAsyncEnumerable SelectManyAwaitCore(this IAsyncEnumerable source, Func>> selector) { if (source == null) @@ -145,6 +156,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use SelectMany. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the SelectManyAwaitWithCancellation functionality now exists as overloads of SelectMany.")] private static IAsyncEnumerable SelectManyAwaitWithCancellationCore(this IAsyncEnumerable source, Func>> selector) { if (source == null) @@ -176,6 +188,9 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu } #endif +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.selectmany?view=net-9.0-pp#system-linq-asyncenumerable-selectmany-3(system-collections-generic-iasyncenumerable((-0))-system-func((-0-system-collections-generic-iasyncenumerable((-1))))-system-func((-0-1-2))) + /// /// Projects each element of an async-enumerable sequence to an async-enumerable sequence, invokes the result selector for the source element and each of the corresponding inner sequence's elements, and merges the results into one async-enumerable sequence. /// @@ -211,6 +226,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu } } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Projects each element of an async-enumerable sequence to an async-enumerable sequence by awaiting the result of a transform function, invokes the result selector for each of the source elements and each of the corrasponding inner-sequence's elements and awaits the result, and merges the results into one async-enumerable sequence. @@ -224,6 +240,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu /// An async-enumerable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence, awaiting the result, applying to each element of the intermediate sequences along with their corrasponding source element and awaiting the result. /// , , or is . [GenerateAsyncOverload] + [Obsolete("Use SelectMany. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the SelectManyAwait functionality now exists as overloads of SelectMany.")] private static IAsyncEnumerable SelectManyAwaitCore(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) { if (source == null) @@ -251,6 +268,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use SelectMany. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the SelectManyAwaitWithCancellation functionality now exists as overloads of SelectMany.")] private static IAsyncEnumerable SelectManyAwaitWithCancellationCore(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) { if (source == null) @@ -277,6 +295,9 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu } #endif +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.selectmany?view=net-9.0-pp#system-linq-asyncenumerable-selectmany-3(system-collections-generic-iasyncenumerable((-0))-system-func((-0-system-int32-system-collections-generic-ienumerable((-1))))-system-func((-0-1-2))) + /// /// Projects each element of an async-enumerable sequence to an async-enumerable sequence by incorporating the element's index, invokes the result selector for the source element and each of the corresponding inner sequence's elements, and merges the results into one async-enumerable sequence. /// @@ -319,6 +340,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu } } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Projects each element of an async-enumerable sequence to an async-enumerable sequence by awaiting the result of a transform function that incorporates each element's index, @@ -333,6 +355,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu /// An async-enumerable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence, awaiting the result, applying to each element of the intermediate sequences olong with their corrasponding source element and awaiting the result. /// , , or is . [GenerateAsyncOverload] + [Obsolete("Use SelectMany. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the SelectManyAwait functionality now exists as overloads of SelectMany.")] private static IAsyncEnumerable SelectManyAwaitCore(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) { if (source == null) @@ -367,6 +390,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use SelectMany. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the SelectManyAwaitWithCancellation functionality now exists as overloads of SelectMany.")] private static IAsyncEnumerable SelectManyAwaitWithCancellationCore(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SequenceEqual.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SequenceEqual.cs index 801cd734b..df2fb804b 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SequenceEqual.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SequenceEqual.cs @@ -10,6 +10,10 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.sequenceequalasync?view=net-9.0-pp + // The method above covers the next two overloads because it supplies a default null value for comparer. + /// /// Determines whether two sequences are equal by comparing the elements pairwise. /// @@ -84,5 +88,6 @@ static async ValueTask Core(IAsyncEnumerable first, IAsyncEnumera return !await e2.MoveNextAsync(); } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } } 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 8f2aef284..aa0ae170e 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 @@ -10,6 +10,9 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.singleasync?view=net-9.0-pp#system-linq-asyncenumerable-singleasync-1(system-collections-generic-iasyncenumerable((-0))-system-threading-cancellationtoken) + /// /// Returns the only element of an async-enumerable sequence, and reports an exception if there is not exactly one element in the async-enumerable sequence. /// @@ -56,6 +59,8 @@ static async ValueTask Core(IAsyncEnumerable source, Cancellat } } + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.singleasync?view=net-9.0-pp#system-linq-asyncenumerable-singleasync-1(system-collections-generic-iasyncenumerable((-0))-system-func((-0-system-boolean))-system-threading-cancellationtoken) + /// /// Returns the only element of an async-enumerable sequence that satisfies the condition in the predicate, and reports an exception if there is not exactly one element in the async-enumerable sequence. /// @@ -101,6 +106,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Returns the only element of an async-enumerable sequence that satisfies the condition in the asynchronous predicate, and reports an exception if there is not exactly one element in the async-enumerable sequence that matches the predicate. @@ -113,6 +119,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func or is null. /// (Asynchronous) No element satisfies the condition in the predicate. -or- More than one element satisfies the condition in the predicate. -or- The source sequence is empty. [GenerateAsyncOverload] + [Obsolete("Use SingleAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the SingleAwaitAsync functionality now exists as overloads of SingleAsync.")] private static ValueTask SingleAwaitAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) @@ -151,6 +158,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func SingleAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) 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 08e0c7e9e..c7aa9edcd 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 @@ -10,6 +10,9 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.singleordefaultasync?view=net-9.0-pp#system-linq-asyncenumerable-singleordefaultasync-1(system-collections-generic-iasyncenumerable((-0))-system-threading-cancellationtoken) + /// /// Returns the only element of an async-enumerable sequence, or a default value if the async-enumerable sequence is empty; this method reports an exception if there is more than one element in the async-enumerable sequence. /// @@ -57,6 +60,8 @@ public static partial class AsyncEnumerable } } + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.singleordefaultasync?view=net-9.0-pp#system-linq-asyncenumerable-singleordefaultasync-1(system-collections-generic-iasyncenumerable((-0))-system-func((-0-system-boolean))-system-threading-cancellationtoken) + /// /// Returns the only element of an async-enumerable sequence that matches the predicate, or a default value if no such element exists; this method reports an exception if there is more than one element in the async-enumerable sequence. /// @@ -102,6 +107,7 @@ public static partial class AsyncEnumerable return default; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Returns the only element of an async-enumerable sequence that satisfies the condition in the asynchronous predicate, or a default value if no such element exists, and reports an exception if there is more than one element in the async-enumerable sequence that matches the predicate. @@ -114,6 +120,7 @@ public static partial class AsyncEnumerable /// or is null. /// (Asynchronous) More than one element satisfies the condition in the predicate. [GenerateAsyncOverload] + [Obsolete("Use SingleOrDefaultAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the SingleOrDefaultAwaitAsync functionality now exists as overloads of SingleOrDefaultAsync.")] private static ValueTask SingleOrDefaultAwaitAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) @@ -152,6 +159,7 @@ public static partial class AsyncEnumerable #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use SingleOrDefaultAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the SingleOrDefaultAwaitWithCancellationAsync functionality now exists as overloads of SingleOrDefaultAsync.")] private static ValueTask SingleOrDefaultAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Skip.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Skip.cs index 8fd12a350..fb463e414 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Skip.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Skip.cs @@ -8,6 +8,9 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.skip?view=net-9.0-pp + /// /// Bypasses a specified number of elements in an async-enumerable sequence and then returns the remaining elements. /// @@ -44,5 +47,6 @@ public static IAsyncEnumerable Skip(this IAsyncEnumerable(source, count, -1); } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } } diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SkipLast.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SkipLast.cs index fab55d968..b47f97ccd 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SkipLast.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SkipLast.cs @@ -11,6 +11,9 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.skiplast?view=net-9.0-pp + /// /// Bypasses a specified number of elements at the end of an async-enumerable sequence. /// @@ -68,5 +71,6 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, in } } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } } 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 a30e7bcfa..c5c03d38c 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 @@ -10,6 +10,9 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.skipwhile?view=net-9.0-pp#system-linq-asyncenumerable-skipwhile-1(system-collections-generic-iasyncenumerable((-0))-system-func((-0-system-boolean))) + /// /// Bypasses elements in an async-enumerable sequence as long as a specified condition is true and then returns the remaining elements. /// @@ -50,6 +53,8 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu } } + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.skipwhile?view=net-9.0-pp#system-linq-asyncenumerable-skipwhile-1(system-collections-generic-iasyncenumerable((-0))-system-func((-0-system-int32-system-boolean))) + /// /// Bypasses elements in an async-enumerable sequence as long as a specified condition is true and then returns the remaining elements. /// The element's index is used in the logic of the predicate function. @@ -96,6 +101,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu } } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Bypasses elements in an async-enumerable sequence as long as a condition is true, and then returns the remaining elements. @@ -106,6 +112,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu /// An async-enumerable sequence containing the elements in the source sequence starting at the first element that does not pass the test specified by the predicate. /// or is . [GenerateAsyncOverload] + [Obsolete("Use SkipWhile. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the SkipWhileAwait functionality now exists as overloads of SkipWhile.")] private static IAsyncEnumerable SkipWhileAwaitCore(this IAsyncEnumerable source, Func> predicate) { if (source == null) @@ -140,6 +147,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use SkipWhile. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the SkipWhileAwaitWithCancellation functionality now exists as overloads of SkipWhile.")] private static IAsyncEnumerable SkipWhileAwaitWithCancellationCore(this IAsyncEnumerable source, Func> predicate) { if (source == null) @@ -183,6 +191,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu /// An async-enumerable sequence containing the elements in the source sequence starting at the first element that does not pass the test specified by the predicate. /// or is . [GenerateAsyncOverload] + [Obsolete("Use SkipWhile. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the SkipWhileAwait functionality now exists as overloads of SkipWhile.")] private static IAsyncEnumerable SkipWhileAwaitCore(this IAsyncEnumerable source, Func> predicate) { if (source == null) @@ -223,6 +232,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use SkipWhile. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the SkipWhileAwaitWithCancellation functionality now exists as overloads of SkipWhile.")] private static IAsyncEnumerable SkipWhileAwaitWithCancellationCore(this IAsyncEnumerable source, Func> predicate) { if (source == null) 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 cd9be75fa..9829a4f90 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 @@ -10,6 +10,7 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Computes the sum of a sequence of values. /// @@ -40,6 +41,7 @@ static async ValueTask Core(IAsyncEnumerable source, CancellationToken return sum; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the input sequence. @@ -51,6 +53,7 @@ static async ValueTask Core(IAsyncEnumerable source, CancellationToken /// An async-enumerable sequence containing a single element with the sum of the values in the source sequence. /// or is null. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static ValueTask SumAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -78,18 +81,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the source sequence and awaiting the result. - /// - /// The type of elements in the source sequence. - /// A sequence of values that are used to calculate a sum. - /// An asynchronous transform function to apply to each element. - /// The optional cancellation token to be used for cancelling the sequence at any time. - /// A ValueTask containing the sum of the values in the source sequence. - /// or is . - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - [GenerateAsyncOverload] - private static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] + internal static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -117,8 +110,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] + internal static ValueTask SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -146,6 +139,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the sum of a sequence of values. /// @@ -176,6 +170,7 @@ static async ValueTask Core(IAsyncEnumerable source, CancellationTok return sum; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the input sequence. @@ -187,6 +182,7 @@ static async ValueTask Core(IAsyncEnumerable source, CancellationTok /// An async-enumerable sequence containing a single element with the sum of the values in the source sequence. /// or is null. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static ValueTask SumAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -214,18 +210,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the source sequence and awaiting the result. - /// - /// The type of elements in the source sequence. - /// A sequence of values that are used to calculate a sum. - /// An asynchronous transform function to apply to each element. - /// The optional cancellation token to be used for cancelling the sequence at any time. - /// A ValueTask containing the sum of the values in the source sequence. - /// or is . - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - [GenerateAsyncOverload] - private static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] + internal static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -253,8 +239,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] + internal static ValueTask SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -282,6 +268,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the sum of a sequence of values. /// @@ -309,6 +296,7 @@ static async ValueTask Core(IAsyncEnumerable source, CancellationT return sum; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the input sequence. @@ -320,6 +308,7 @@ static async ValueTask Core(IAsyncEnumerable source, CancellationT /// An async-enumerable sequence containing a single element with the sum of the values in the source sequence. /// or is null. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static ValueTask SumAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -344,18 +333,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the source sequence and awaiting the result. - /// - /// The type of elements in the source sequence. - /// A sequence of values that are used to calculate a sum. - /// An asynchronous transform function to apply to each element. - /// The optional cancellation token to be used for cancelling the sequence at any time. - /// A ValueTask containing the sum of the values in the source sequence. - /// or is . - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - [GenerateAsyncOverload] - private static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] + internal static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -380,8 +359,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] + internal static ValueTask SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -406,6 +385,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the sum of a sequence of values. /// @@ -433,6 +413,7 @@ static async ValueTask Core(IAsyncEnumerable source, Cancellatio return sum; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the input sequence. @@ -444,6 +425,7 @@ static async ValueTask Core(IAsyncEnumerable source, Cancellatio /// An async-enumerable sequence containing a single element with the sum of the values in the source sequence. /// or is null. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static ValueTask SumAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -468,18 +450,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the source sequence and awaiting the result. - /// - /// The type of elements in the source sequence. - /// A sequence of values that are used to calculate a sum. - /// An asynchronous transform function to apply to each element. - /// The optional cancellation token to be used for cancelling the sequence at any time. - /// A ValueTask containing the sum of the values in the source sequence. - /// or is . - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - [GenerateAsyncOverload] - private static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] + internal static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -504,8 +476,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] + internal static ValueTask SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -530,6 +502,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the sum of a sequence of values. /// @@ -557,6 +530,7 @@ static async ValueTask Core(IAsyncEnumerable source, Cancellat return sum; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the input sequence. @@ -568,6 +542,7 @@ static async ValueTask Core(IAsyncEnumerable source, Cancellat /// An async-enumerable sequence containing a single element with the sum of the values in the source sequence. /// or is null. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static ValueTask SumAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -592,18 +567,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the source sequence and awaiting the result. - /// - /// The type of elements in the source sequence. - /// A sequence of values that are used to calculate a sum. - /// An asynchronous transform function to apply to each element. - /// The optional cancellation token to be used for cancelling the sequence at any time. - /// A ValueTask containing the sum of the values in the source sequence. - /// or is . - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - [GenerateAsyncOverload] - private static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] + internal static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -628,8 +593,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] + internal static ValueTask SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -654,6 +619,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the sum of a sequence of values. /// @@ -684,6 +650,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the input sequence. @@ -695,6 +662,7 @@ static async ValueTask Core(IAsyncEnumerable source, FuncAn async-enumerable sequence containing a single element with the sum of the values in the source sequence. /// or is null. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static ValueTask SumAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -722,18 +690,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the source sequence and awaiting the result. - /// - /// The type of elements in the source sequence. - /// A sequence of values that are used to calculate a sum. - /// An asynchronous transform function to apply to each element. - /// The optional cancellation token to be used for cancelling the sequence at any time. - /// A ValueTask containing the sum of the values in the source sequence. - /// or is . - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - [GenerateAsyncOverload] - private static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] + internal static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -761,8 +719,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] + internal static ValueTask SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -790,6 +748,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the sum of a sequence of values. /// @@ -820,6 +779,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the input sequence. @@ -831,6 +791,7 @@ static async ValueTask Core(IAsyncEnumerable source, FuncAn async-enumerable sequence containing a single element with the sum of the values in the source sequence. /// or is null. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static ValueTask SumAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -858,18 +819,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the source sequence and awaiting the result. - /// - /// The type of elements in the source sequence. - /// A sequence of values that are used to calculate a sum. - /// An asynchronous transform function to apply to each element. - /// The optional cancellation token to be used for cancelling the sequence at any time. - /// A ValueTask containing the sum of the values in the source sequence. - /// or is . - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - [GenerateAsyncOverload] - private static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] + internal static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -897,8 +848,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] + internal static ValueTask SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -926,6 +877,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the sum of a sequence of values. /// @@ -953,6 +905,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the input sequence. @@ -964,6 +917,7 @@ static async ValueTask Core(IAsyncEnumerable source, FuncAn async-enumerable sequence containing a single element with the sum of the values in the source sequence. /// or is null. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static ValueTask SumAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -988,18 +942,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the source sequence and awaiting the result. - /// - /// The type of elements in the source sequence. - /// A sequence of values that are used to calculate a sum. - /// An asynchronous transform function to apply to each element. - /// The optional cancellation token to be used for cancelling the sequence at any time. - /// A ValueTask containing the sum of the values in the source sequence. - /// or is . - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - [GenerateAsyncOverload] - private static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] + internal static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1024,8 +968,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] + internal static ValueTask SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1050,6 +994,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the sum of a sequence of values. /// @@ -1077,6 +1022,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the input sequence. @@ -1088,6 +1034,7 @@ static async ValueTask Core(IAsyncEnumerable source, FuncAn async-enumerable sequence containing a single element with the sum of the values in the source sequence. /// or is null. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static ValueTask SumAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -1112,18 +1059,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the source sequence and awaiting the result. - /// - /// The type of elements in the source sequence. - /// A sequence of values that are used to calculate a sum. - /// An asynchronous transform function to apply to each element. - /// The optional cancellation token to be used for cancelling the sequence at any time. - /// A ValueTask containing the sum of the values in the source sequence. - /// or is . - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - [GenerateAsyncOverload] - private static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] + internal static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1148,8 +1085,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] + internal static ValueTask SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1174,6 +1111,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the sum of a sequence of values. /// @@ -1201,6 +1139,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the input sequence. @@ -1212,6 +1151,7 @@ static async ValueTask Core(IAsyncEnumerable source, FuncAn async-enumerable sequence containing a single element with the sum of the values in the source sequence. /// or is null. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static ValueTask SumAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -1236,18 +1176,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the source sequence and awaiting the result. - /// - /// The type of elements in the source sequence. - /// A sequence of values that are used to calculate a sum. - /// An asynchronous transform function to apply to each element. - /// The optional cancellation token to be used for cancelling the sequence at any time. - /// A ValueTask containing the sum of the values in the source sequence. - /// or is . - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - [GenerateAsyncOverload] - private static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] + internal static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1272,8 +1202,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] + 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 d765430fe..c2866e384 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 @@ -40,6 +40,7 @@ foreach (var o in os) typeStr = "Nullable{" + o.type.Substring(0, 1).ToUpper() + o.type.Substring(1, o.type.Length - 2) + "}"; } #> +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Computes the sum of a sequence of values. /// @@ -83,6 +84,7 @@ else return sum; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the input sequence. @@ -94,6 +96,7 @@ else /// An async-enumerable sequence containing a single element with the sum of the values in the source sequence. /// or is null. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static ValueTask<<#=o.type#>> SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -134,6 +137,7 @@ else } } + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] internal static ValueTask<<#=o.type#>> SumAwaitAsyncCore(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -175,6 +179,7 @@ else } #if !NO_DEEP_CANCELLATION + [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] internal static ValueTask<<#=o.type#>> SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Take.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Take.cs index b5820dccf..b7d9b547f 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Take.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Take.cs @@ -8,6 +8,10 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.take?view=net-9.0-pp#system-linq-asyncenumerable-take-1(system-collections-generic-iasyncenumerable((-0))-system-int32) + /// /// Returns a specified number of contiguous elements from the start of an async-enumerable sequence. /// @@ -37,5 +41,6 @@ public static IAsyncEnumerable Take(this IAsyncEnumerable(source, 0, count - 1); } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } } diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/TakeLast.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/TakeLast.cs index 19f27bc4b..76c1a641e 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/TakeLast.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/TakeLast.cs @@ -11,6 +11,10 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.takelast?view=net-9.0-pp + /// /// Returns a specified number of contiguous elements from the end of an async-enumerable sequence. /// @@ -77,5 +81,6 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, in while (queue.Count > 0); } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } } 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 d214e48c2..2f34b0dbf 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 @@ -10,6 +10,9 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.takewhile?view=net-9.0-pp#system-linq-asyncenumerable-takewhile-1(system-collections-generic-iasyncenumerable((-0))-system-func((-0-system-boolean))) + /// /// Returns elements from an async-enumerable sequence as long as a specified condition is true. /// @@ -41,6 +44,8 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu } } + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.takewhile?view=net-9.0-pp#system-linq-asyncenumerable-takewhile-1(system-collections-generic-iasyncenumerable((-0))-system-func((-0-system-int32-system-boolean))) + /// /// Returns elements from an async-enumerable sequence as long as a specified condition is true. /// The element's index is used in the logic of the predicate function. @@ -79,6 +84,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu } } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Returns elements from an async-enumerable sequence as long as a specified condition is true. @@ -89,6 +95,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu /// An async-enumerable sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes. /// or is null. [GenerateAsyncOverload] + [Obsolete("Use TakeWhile. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the TakeWhileAwait functionality now exists as overloads of TakeWhile.")] private static IAsyncEnumerable TakeWhileAwaitCore(this IAsyncEnumerable source, Func> predicate) { if (source == null) @@ -114,6 +121,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use TakeWhile. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the TakeWhileAwaitWithCancellation functionality now exists as overloads of TakeWhile.")] private static IAsyncEnumerable TakeWhileAwaitWithCancellationCore(this IAsyncEnumerable source, Func> predicate) { if (source == null) @@ -148,6 +156,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu /// An async-enumerable sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes. /// or is null. [GenerateAsyncOverload] + [Obsolete("Use TakeWhile. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the TakeWhileAwait functionality now exists as overloads of TakeWhile.")] private static IAsyncEnumerable TakeWhileAwaitCore(this IAsyncEnumerable source, Func> predicate) { if (source == null) @@ -180,6 +189,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use TakeWhile. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the TakeWhileAwaitWithCancellation functionality now exists as overloads of TakeWhile.")] private static IAsyncEnumerable TakeWhileAwaitWithCancellationCore(this IAsyncEnumerable source, Func> predicate) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToArray.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToArray.cs index 7b731b8ea..34009ae90 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToArray.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToArray.cs @@ -10,6 +10,9 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.toarrayasync?view=net-9.0-pp + /// /// Creates an array from an async-enumerable sequence. /// @@ -29,5 +32,6 @@ public static ValueTask ToArrayAsync(this IAsyncEnumerable /// Converts an observable sequence to an async-enumerable sequence. /// @@ -218,5 +225,6 @@ private Task Resume() } } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } } diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToAsyncEnumerable.Task.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToAsyncEnumerable.Task.cs index 400289b05..61e6f23e9 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToAsyncEnumerable.Task.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToAsyncEnumerable.Task.cs @@ -9,6 +9,12 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // Moved to AsyncEnumerableEx in System.Interactive.Async. + // System.Linq.AsyncEnumerable has chosen not to implement this. We continue to implement this because + // we believe it is a useful feature, but since it's now in the category of LINQ-adjacent functionality + // not built into the .NET runtime libraries, it now lives in System.Interactive.Async. + /// /// Converts a task to an async-enumerable sequence. /// @@ -44,5 +50,6 @@ protected override async ValueTask MoveNextCore() return false; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } } 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 97cfedf87..0fa9fcb3e 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 @@ -10,6 +10,10 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.todictionaryasync?view=net-9.0-pp#system-linq-asyncenumerable-todictionaryasync-2(system-collections-generic-iasyncenumerable((-0))-system-func((-0-1))-system-collections-generic-iequalitycomparer((-1))-system-threading-cancellationtoken) + // That one overload covers the next two methods, because it supplieds a default comparer. + /// /// Creates a dictionary from an async-enumerable sequence according to a specified key selector function. /// @@ -59,6 +63,7 @@ static async ValueTask> Core(IAsyncEnumerable return d; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Creates a dictionary from an async-enumerable sequence by invoking a key-selector function on each element and awaiting the result. @@ -72,6 +77,7 @@ static async ValueTask> Core(IAsyncEnumerable /// or is null. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] + [Obsolete("Use ToDictionaryAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ToDictionaryAwaitAsync functionality now exists as overloads of ToDictionaryAsync.")] private static ValueTask> ToDictionaryAwaitAsyncCore(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken = default) where TKey : notnull => ToDictionaryAwaitAsyncCore(source, keySelector, comparer: null, cancellationToken); @@ -88,6 +94,7 @@ private static ValueTask> ToDictionaryAwaitAsyncCore or or is null. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] + [Obsolete("Use ToDictionaryAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ToDictionaryAwaitAsync functionality now exists as overloads of ToDictionaryAsync.")] private static ValueTask> ToDictionaryAwaitAsyncCore(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer? comparer, CancellationToken cancellationToken = default) where TKey : notnull { if (source == null) @@ -114,10 +121,12 @@ static async ValueTask> Core(IAsyncEnumerable #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use ToDictionaryAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ToDictionaryAwaitWithCancellationAsync functionality now exists as overloads of ToDictionaryAsync.")] private static ValueTask> ToDictionaryAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken = default) where TKey : notnull => ToDictionaryAwaitWithCancellationAsyncCore(source, keySelector, comparer: null, cancellationToken); [GenerateAsyncOverload] + [Obsolete("Use ToDictionaryAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ToDictionaryAwaitWithCancellationAsync functionality now exists as overloads of ToDictionaryAsync.")] private static ValueTask> ToDictionaryAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer? comparer, CancellationToken cancellationToken = default) where TKey : notnull { if (source == null) @@ -143,6 +152,12 @@ static async ValueTask> Core(IAsyncEnumerable } #endif +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.todictionaryasync?view=net-9.0-pp#system-linq-asyncenumerable-todictionaryasync-2(system-collections-generic-iasyncenumerable((-0))-system-func((-0-1))-system-collections-generic-iequalitycomparer((-1))-system-threading-cancellationtoken) + // The method above provides the functionality for each of the next two methods, although because it does so with a + // single method that provides a default null value for the comparer, it it's not a strict source-compatible + // replacement. But there's not much we can do about that. + /// /// Creates a dictionary from an async-enumerable sequence according to a specified key selector function, and an element selector function. /// @@ -199,6 +214,7 @@ static async ValueTask> Core(IAsyncEnumerable /// Creates a dictionary from an async-enumerable sequence using the specified asynchronous key and element selector functions. @@ -214,6 +230,7 @@ static async ValueTask> Core(IAsyncEnumerable or or is null. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] + [Obsolete("Use ToDictionaryAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ToDictionaryAwaitAsync functionality now exists as overloads of ToDictionaryAsync.")] private static ValueTask> ToDictionaryAwaitAsyncCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken = default) where TKey : notnull => ToDictionaryAwaitAsyncCore(source, keySelector, elementSelector, comparer: null, cancellationToken); @@ -232,6 +249,7 @@ private static ValueTask> ToDictionaryAwaitAsyncCore< /// or or or is null. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] + [Obsolete("Use ToDictionaryAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ToDictionaryAwaitAsync functionality now exists as overloads of ToDictionaryAsync.")] private static ValueTask> ToDictionaryAwaitAsyncCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer? comparer, CancellationToken cancellationToken = default) where TKey : notnull { if (source == null) @@ -261,10 +279,12 @@ static async ValueTask> Core(IAsyncEnumerable> ToDictionaryAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken = default) where TKey : notnull => ToDictionaryAwaitWithCancellationAsyncCore(source, keySelector, elementSelector, comparer: null, cancellationToken); [GenerateAsyncOverload] + [Obsolete("Use ToDictionaryAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ToDictionaryAwaitWithCancellationAsync functionality now exists as overloads of ToDictionaryAsync.")] private static ValueTask> ToDictionaryAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer? comparer, CancellationToken cancellationToken = default) where TKey : notnull { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToEnumerable.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToEnumerable.cs index ab6f99e7f..bddecb8a7 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToEnumerable.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToEnumerable.cs @@ -19,6 +19,7 @@ public static partial class AsyncEnumerable /// An async-enumerable sequence to convert to an enumerable sequence. /// The enumerable sequence containing the elements in the async-enumerable sequence. /// is null. + [Obsolete("IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and it does not implement this method because 'sync over async' of this kind is an anti-pattern. Please use a different strategy.")] public static IEnumerable ToEnumerable(this IAsyncEnumerable source) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToHashSet.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToHashSet.cs index 2bf7c487f..a2cb32a04 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToHashSet.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToHashSet.cs @@ -10,6 +10,10 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.tohashsetasync?view=net-9.0-pp + // That one overload covers the next two methods, because it supplieds a default comparer. + /// /// Creates a hash set from an async-enumerable sequence. /// @@ -51,5 +55,6 @@ static async ValueTask> Core(IAsyncEnumerable source, return set; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } } diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToList.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToList.cs index 6c50505d4..d5ed2294a 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToList.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToList.cs @@ -10,6 +10,9 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.tolistasync?view=net-9.0-pp + /// /// Creates a list from an async-enumerable sequence. /// @@ -41,5 +44,6 @@ static async ValueTask> Core(IAsyncEnumerable source, Can return list; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } } 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 4ad7f7e04..a57f98dea 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 @@ -10,6 +10,10 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.tolookupasync?view=net-9.0-pp#system-linq-asyncenumerable-tolookupasync-2(system-collections-generic-iasyncenumerable((-0))-system-func((-0-1))-system-collections-generic-iequalitycomparer((-1))-system-threading-cancellationtoken) + // That one overload covers the next two methods, because it supplieds a default comparer. + /// /// Creates a lookup from an async-enumerable sequence according to a specified key selector function. /// @@ -50,6 +54,7 @@ static async ValueTask> Core(IAsyncEnumerable so return await Internal.Lookup.CreateAsync(source, keySelector, comparer, cancellationToken).ConfigureAwait(false); } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Creates a lookup from an async-enumerable sequence by invoking a key-selector function on each element and awaiting the result. @@ -63,6 +68,7 @@ static async ValueTask> Core(IAsyncEnumerable so /// or is null. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] + [Obsolete("Use ToLookupAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ToLookupAwaitAsync functionality now exists as overloads of ToLookupAsync.")] private static ValueTask> ToLookupAwaitAsyncCore(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken = default) => ToLookupAwaitAsyncCore(source, keySelector, comparer:null, cancellationToken); @@ -79,6 +85,7 @@ private static ValueTask> ToLookupAwaitAsyncCore or or is null. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] + [Obsolete("Use ToLookupAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ToLookupAwaitAsync functionality now exists as overloads of ToLookupAsync.")] private static ValueTask> ToLookupAwaitAsyncCore(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer? comparer, CancellationToken cancellationToken = default) { if (source == null) @@ -96,10 +103,12 @@ static async ValueTask> Core(IAsyncEnumerable so #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use ToLookupAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ToLookupAwaitWithCancellationAsync functionality now exists as overloads of ToLookupAsync.")] private static ValueTask> ToLookupAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken = default) => ToLookupAwaitWithCancellationAsyncCore(source, keySelector, comparer: null, cancellationToken); [GenerateAsyncOverload] + [Obsolete("Use ToLookupAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ToLookupAwaitWithCancellationAsync functionality now exists as overloads of ToLookupAsync.")] private static ValueTask> ToLookupAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer? comparer, CancellationToken cancellationToken = default) { if (source == null) @@ -116,6 +125,10 @@ static async ValueTask> Core(IAsyncEnumerable so } #endif +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.tolookupasync?view=net-9.0-pp#system-linq-asyncenumerable-tolookupasync-3(system-collections-generic-iasyncenumerable((-0))-system-func((-0-1))-system-func((-0-2))-system-collections-generic-iequalitycomparer((-1))-system-threading-cancellationtoken) + // That one overload covers the next two methods, because it supplieds a default comparer. + /// /// Creates a lookup from an async-enumerable sequence according to a specified key selector function, and an element selector function. /// @@ -162,6 +175,7 @@ static async ValueTask> Core(IAsyncEnumerable s return await Internal.Lookup.CreateAsync(source, keySelector, elementSelector, comparer, cancellationToken).ConfigureAwait(false); } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Creates a lookup from an async-enumerable sequence by invoking key and element selector functions on each source element and awaiting the results. @@ -177,6 +191,7 @@ static async ValueTask> Core(IAsyncEnumerable s /// or or is null. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] + [Obsolete("Use ToLookupAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ToLookupAwaitAsync functionality now exists as overloads of ToLookupAsync.")] private static ValueTask> ToLookupAwaitAsyncCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken = default) => ToLookupAwaitAsyncCore(source, keySelector, elementSelector, comparer: null, cancellationToken); @@ -195,6 +210,7 @@ private static ValueTask> ToLookupAwaitAsyncCore or or or is null. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] + [Obsolete("Use ToLookupAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ToLookupAwaitAsync functionality now exists as overloads of ToLookupAsync.")] private static ValueTask> ToLookupAwaitAsyncCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer? comparer, CancellationToken cancellationToken = default) { if (source == null) @@ -214,10 +230,12 @@ static async ValueTask> Core(IAsyncEnumerable s #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use ToLookupAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ToLookupAwaitWithCancellationAsync functionality now exists as overloads of ToLookupAsync.")] private static ValueTask> ToLookupAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken = default) => ToLookupAwaitWithCancellationAsyncCore(source, keySelector, elementSelector, comparer: null, cancellationToken); [GenerateAsyncOverload] + [Obsolete("Use ToLookupAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ToLookupAwaitWithCancellationAsync functionality now exists as overloads of ToLookupAsync.")] private static ValueTask> ToLookupAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer? comparer, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToObservable.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToObservable.cs index 0e60ff045..464233d3a 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToObservable.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToObservable.cs @@ -8,6 +8,13 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + + // Moved to AsyncEnumerableEx in System.Interactive.Async. + // System.Linq.AsyncEnumerable has chosen not to implement this. We continue to implement this because + // we believe it is a useful feature, but since it's now in the category of LINQ-adjacent functionality + // not built into the .NET runtime libraries, it now lives in System.Interactive.Async. + /// /// Converts an async-enumerable sequence to an observable sequence. /// @@ -79,5 +86,6 @@ async void Core() return ctd; } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } } diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Union.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Union.cs index 1537a05d2..7ac699ecb 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Union.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Union.cs @@ -11,6 +11,10 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.union?view=net-9.0-pp + // That one overload covers the next two methods, because it supplieds a default comparer. + /// /// Produces the set union of two sequences by using the default equality comparer. /// @@ -290,5 +294,6 @@ internal override UnionAsyncIterator Union(IAsyncEnumerable ne return new UnionAsyncIteratorN(_sources.Add(next), _headIndex + 1, _comparer); } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES } } 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 705b07ac6..f4b96f071 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 @@ -10,6 +10,10 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.where?view=net-9.0-pp#system-linq-asyncenumerable-where-1(system-collections-generic-iasyncenumerable((-0))-system-func((-0-system-boolean))) + /// /// Filters the elements of an async-enumerable sequence based on a predicate. /// @@ -34,6 +38,8 @@ public static IAsyncEnumerable Where(this IAsyncEnumerable(source, predicate); } + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.where?view=net-9.0-pp#system-linq-asyncenumerable-where-1(system-collections-generic-iasyncenumerable((-0))-system-func((-0-system-int32-system-boolean))) + /// /// Filters the elements of an async-enumerable sequence based on a predicate by incorporating the element's index. /// @@ -69,6 +75,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu } } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES /// /// Filters the elements of an async-enumerable sequence based on an asynchronous predicate. @@ -79,6 +86,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu /// An async-enumerable sequence that contains elements from the input sequence that satisfy the condition. /// or is null. [GenerateAsyncOverload] + [Obsolete("Use Where. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the WhereAwait functionality now exists as overloads of Where.")] private static IAsyncEnumerable WhereAwaitCore(this IAsyncEnumerable source, Func> predicate) { if (source == null) @@ -97,6 +105,7 @@ private static IAsyncEnumerable WhereAwaitCore(this IAsyncEnum #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use Where. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the WhereAwaitWithCancellation functionality now exists as overloads of Where.")] private static IAsyncEnumerable WhereAwaitWithCancellationCore(this IAsyncEnumerable source, Func> predicate) { if (source == null) @@ -123,6 +132,7 @@ private static IAsyncEnumerable WhereAwaitWithCancellationCore /// An async-enumerable sequence that contains elements from the input sequence that satisfy the condition. /// or is null. [GenerateAsyncOverload] + [Obsolete("Use Where. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the WhereAwait functionality now exists as overloads of Where.")] private static IAsyncEnumerable WhereAwaitCore(this IAsyncEnumerable source, Func> predicate) { if (source == null) @@ -153,6 +163,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable source, Fu #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use Where. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the WhereAwaitWithCancellation functionality now exists as overloads of Where.")] private static IAsyncEnumerable WhereAwaitWithCancellationCore(this IAsyncEnumerable source, Func> predicate) { if (source == null) 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 ec2a49f0d..f6f8ca228 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 @@ -10,6 +10,19 @@ namespace System.Linq { public static partial class AsyncEnumerable { +#if INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.zip?view=net-9.0-pp#system-linq-asyncenumerable-zip-2(system-collections-generic-iasyncenumerable((-0))-system-collections-generic-iasyncenumerable((-1))) + + /// + /// Merges two async-enumerable sequences into one async-enumerable sequence by combining their elements in a pairwise fashion. + /// + /// The type of the elements in the first source sequence. + /// The type of the elements in the second source sequence. + /// The type of the elements in the result sequence, returned by the selector function. + /// First async-enumerable source. + /// Second async-enumerable source. + /// An async-enumerable sequence containing the result of pairwise combining the elements of the first and second source using the specified result selector function. + /// or or is null. public static IAsyncEnumerable<(TFirst First, TSecond Second)> Zip(this IAsyncEnumerable first, IAsyncEnumerable second) { if (first == null) @@ -31,6 +44,8 @@ public static partial class AsyncEnumerable } } + // https://learn.microsoft.com/en-us/dotnet/api/system.linq.asyncenumerable.zip?view=net-9.0-pp#system-linq-asyncenumerable-zip-3(system-collections-generic-iasyncenumerable((-0))-system-collections-generic-iasyncenumerable((-1))-system-func((-0-1-2))) + /// /// Merges two async-enumerable sequences into one async-enumerable sequence by combining their elements in a pairwise fashion. /// @@ -65,6 +80,8 @@ static async IAsyncEnumerable Core(IAsyncEnumerable first, IAsy } } +#endif // INCLUDE_SYSTEM_LINQ_ASYNCENUMERABLE_DUPLICATES + /// /// Merges two async-enumerable sequences into one async-enumerable sequence by combining their elements in a pairwise fashion. /// @@ -77,6 +94,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable first, IAsy /// An async-enumerable sequence containing the result of pairwise combining the elements of the first and second source using the specified result selector function. /// or or is null. [GenerateAsyncOverload] + [Obsolete("Use Zip. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ZipAwait functionality now exists as overloads of Zip.")] private static IAsyncEnumerable ZipAwaitCore(this IAsyncEnumerable first, IAsyncEnumerable second, Func> selector) { if (first == null) @@ -102,6 +120,7 @@ static async IAsyncEnumerable Core(IAsyncEnumerable first, IAsy #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use Zip. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the ZipAwaitWithCancellation functionality now exists as overloads of Zip.")] private static IAsyncEnumerable ZipAwaitWithCancellationCore(this IAsyncEnumerable first, IAsyncEnumerable second, Func> selector) { if (first == null) diff --git a/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemInteractiveAsync.received.cs b/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemInteractiveAsync.received.cs new file mode 100644 index 000000000..207f025e4 --- /dev/null +++ b/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemInteractiveAsync.received.cs @@ -0,0 +1,145 @@ +[assembly: System.CLSCompliant(true)] +[assembly: System.Resources.NeutralResourcesLanguage("en-US")] +[assembly: System.Runtime.InteropServices.ComVisible(false)] +[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName=".NET 8.0")] +namespace System.Linq +{ + public static class AsyncEnumerableEx + { + public static System.Collections.Generic.IAsyncEnumerable Amb(params System.Collections.Generic.IAsyncEnumerable[] sources) { } + public static System.Collections.Generic.IAsyncEnumerable Amb(this System.Collections.Generic.IEnumerable> sources) { } + public static System.Collections.Generic.IAsyncEnumerable Amb(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second) { } + public static System.Collections.Generic.IAsyncEnumerable AsAsyncEnumerable(this System.Collections.Generic.IAsyncEnumerable source) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Collections.Generic.IAsyncEnumerable> Buffer(this System.Collections.Generic.IAsyncEnumerable source, int count) { } + public static System.Collections.Generic.IAsyncEnumerable> Buffer(this System.Collections.Generic.IAsyncEnumerable source, int count, int skip) { } + public static System.Collections.Generic.IAsyncEnumerable Catch(params System.Collections.Generic.IAsyncEnumerable[] sources) { } + public static System.Collections.Generic.IAsyncEnumerable Catch(this System.Collections.Generic.IEnumerable> sources) { } + public static System.Collections.Generic.IAsyncEnumerable Catch(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second) { } + public static System.Collections.Generic.IAsyncEnumerable Catch(this System.Collections.Generic.IAsyncEnumerable source, System.Func> handler) + where TException : System.Exception { } + public static System.Collections.Generic.IAsyncEnumerable Catch(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> handler) + where TException : System.Exception { } + public static System.Collections.Generic.IAsyncEnumerable Catch(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> handler) + where TException : System.Exception { } + public static System.Collections.Generic.IAsyncEnumerable Concat(params System.Collections.Generic.IAsyncEnumerable[] sources) { } + public static System.Collections.Generic.IAsyncEnumerable Concat(this System.Collections.Generic.IAsyncEnumerable> sources) { } + public static System.Collections.Generic.IAsyncEnumerable Concat(this System.Collections.Generic.IEnumerable> sources) { } + public static System.Collections.Generic.IAsyncEnumerable Defer(System.Func> factory) { } + public static System.Collections.Generic.IAsyncEnumerable Defer(System.Func>> factory) { } + public static System.Collections.Generic.IAsyncEnumerable Defer(System.Func>> factory) { } + public static System.Collections.Generic.IAsyncEnumerable Distinct(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector) { } + public static System.Collections.Generic.IAsyncEnumerable Distinct(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector) { } + public static System.Collections.Generic.IAsyncEnumerable Distinct(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector) { } + public static System.Collections.Generic.IAsyncEnumerable Distinct(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Collections.Generic.IAsyncEnumerable Distinct(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Collections.Generic.IAsyncEnumerable Distinct(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Collections.Generic.IAsyncEnumerable DistinctUntilChanged(this System.Collections.Generic.IAsyncEnumerable source) { } + public static System.Collections.Generic.IAsyncEnumerable DistinctUntilChanged(this System.Collections.Generic.IAsyncEnumerable source, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Collections.Generic.IAsyncEnumerable DistinctUntilChanged(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector) { } + public static System.Collections.Generic.IAsyncEnumerable DistinctUntilChanged(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector) { } + public static System.Collections.Generic.IAsyncEnumerable DistinctUntilChanged(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector) { } + public static System.Collections.Generic.IAsyncEnumerable DistinctUntilChanged(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Collections.Generic.IAsyncEnumerable DistinctUntilChanged(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Collections.Generic.IAsyncEnumerable DistinctUntilChanged(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IEqualityComparer comparer) { } + public static System.Collections.Generic.IAsyncEnumerable Do(this System.Collections.Generic.IAsyncEnumerable source, System.Action onNext) { } + public static System.Collections.Generic.IAsyncEnumerable Do(this System.Collections.Generic.IAsyncEnumerable source, System.Func onNext) { } + public static System.Collections.Generic.IAsyncEnumerable Do(this System.Collections.Generic.IAsyncEnumerable source, System.Func onNext) { } + public static System.Collections.Generic.IAsyncEnumerable Do(this System.Collections.Generic.IAsyncEnumerable source, System.IObserver observer) { } + public static System.Collections.Generic.IAsyncEnumerable Do(this System.Collections.Generic.IAsyncEnumerable source, System.Action onNext, System.Action onCompleted) { } + public static System.Collections.Generic.IAsyncEnumerable Do(this System.Collections.Generic.IAsyncEnumerable source, System.Action onNext, System.Action onError) { } + public static System.Collections.Generic.IAsyncEnumerable Do(this System.Collections.Generic.IAsyncEnumerable source, System.Func onNext, System.Func onCompleted) { } + public static System.Collections.Generic.IAsyncEnumerable Do(this System.Collections.Generic.IAsyncEnumerable source, System.Func onNext, System.Func onError) { } + public static System.Collections.Generic.IAsyncEnumerable Do(this System.Collections.Generic.IAsyncEnumerable source, System.Func onNext, System.Func onCompleted) { } + public static System.Collections.Generic.IAsyncEnumerable Do(this System.Collections.Generic.IAsyncEnumerable source, System.Func onNext, System.Func onError) { } + public static System.Collections.Generic.IAsyncEnumerable Do(this System.Collections.Generic.IAsyncEnumerable source, System.Action onNext, System.Action onError, System.Action onCompleted) { } + public static System.Collections.Generic.IAsyncEnumerable Do(this System.Collections.Generic.IAsyncEnumerable source, System.Func onNext, System.Func onError, System.Func onCompleted) { } + public static System.Collections.Generic.IAsyncEnumerable Do(this System.Collections.Generic.IAsyncEnumerable source, System.Func onNext, System.Func onError, System.Func onCompleted) { } + public static System.Collections.Generic.IAsyncEnumerable Expand(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector) { } + public static System.Collections.Generic.IAsyncEnumerable Expand(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> selector) { } + public static System.Collections.Generic.IAsyncEnumerable Expand(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> selector) { } + public static System.Collections.Generic.IAsyncEnumerable Finally(this System.Collections.Generic.IAsyncEnumerable source, System.Action finallyAction) { } + public static System.Collections.Generic.IAsyncEnumerable Finally(this System.Collections.Generic.IAsyncEnumerable source, System.Func finallyAction) { } + public static System.Collections.Generic.IAsyncEnumerable Generate(TState initialState, System.Func condition, System.Func iterate, System.Func resultSelector) { } + public static System.Collections.Generic.IAsyncEnumerable IgnoreElements(this System.Collections.Generic.IAsyncEnumerable source) { } + public static System.Threading.Tasks.ValueTask IsEmptyAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> MaxByAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> MaxByAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> MaxByAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> MaxByAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> MaxByAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> MaxByAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Collections.Generic.IAsyncEnumerable Merge(params System.Collections.Generic.IAsyncEnumerable[] sources) { } + public static System.Collections.Generic.IAsyncEnumerable Merge(this System.Collections.Generic.IAsyncEnumerable> sources) { } + public static System.Collections.Generic.IAsyncEnumerable Merge(this System.Collections.Generic.IEnumerable> sources) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> MinByAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> MinByAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> MinByAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> MinByAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> MinByAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> MinByAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Collections.Generic.IAsyncEnumerable Never() { } + public static System.Collections.Generic.IAsyncEnumerable OnErrorResumeNext(params System.Collections.Generic.IAsyncEnumerable[] sources) { } + public static System.Collections.Generic.IAsyncEnumerable OnErrorResumeNext(this System.Collections.Generic.IEnumerable> sources) { } + public static System.Collections.Generic.IAsyncEnumerable OnErrorResumeNext(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second) { } + public static System.Collections.Generic.IAsyncEnumerable Repeat(TResult element) { } + public static System.Collections.Generic.IAsyncEnumerable Repeat(this System.Collections.Generic.IAsyncEnumerable source) { } + public static System.Collections.Generic.IAsyncEnumerable Repeat(this System.Collections.Generic.IAsyncEnumerable source, int count) { } + public static System.Collections.Generic.IAsyncEnumerable Retry(this System.Collections.Generic.IAsyncEnumerable source) { } + public static System.Collections.Generic.IAsyncEnumerable Retry(this System.Collections.Generic.IAsyncEnumerable source, int retryCount) { } + public static System.Collections.Generic.IAsyncEnumerable Return(TValue value) { } + public static System.Collections.Generic.IAsyncEnumerable Scan(this System.Collections.Generic.IAsyncEnumerable source, System.Func> accumulator) { } + public static System.Collections.Generic.IAsyncEnumerable Scan(this System.Collections.Generic.IAsyncEnumerable source, System.Func accumulator) { } + public static System.Collections.Generic.IAsyncEnumerable Scan(this System.Collections.Generic.IAsyncEnumerable source, System.Func> accumulator) { } + public static System.Collections.Generic.IAsyncEnumerable Scan(this System.Collections.Generic.IAsyncEnumerable source, TAccumulate seed, System.Func> accumulator) { } + public static System.Collections.Generic.IAsyncEnumerable Scan(this System.Collections.Generic.IAsyncEnumerable source, TAccumulate seed, System.Func accumulator) { } + public static System.Collections.Generic.IAsyncEnumerable Scan(this System.Collections.Generic.IAsyncEnumerable source, TAccumulate seed, System.Func> accumulator) { } + public static System.Collections.Generic.IAsyncEnumerable SelectMany(this System.Collections.Generic.IAsyncEnumerable source, System.Collections.Generic.IAsyncEnumerable other) { } + public static System.Collections.Generic.IAsyncEnumerable StartWith(this System.Collections.Generic.IAsyncEnumerable source, params TSource[] values) { } + public static System.Collections.Generic.IAsyncEnumerable Throw(System.Exception exception) { } + public static System.Collections.Generic.IAsyncEnumerable Timeout(this System.Collections.Generic.IAsyncEnumerable source, System.TimeSpan timeout) { } + public static System.Collections.Generic.IAsyncEnumerable Using(System.Func> resourceFactory, System.Func>> enumerableFactory) + where TResource : System.IDisposable { } + public static System.Collections.Generic.IAsyncEnumerable Using(System.Func resourceFactory, System.Func> enumerableFactory) + where TResource : System.IDisposable { } + public static System.Collections.Generic.IAsyncEnumerable Using(System.Func> resourceFactory, System.Func>> enumerableFactory) + where TResource : System.IDisposable { } + } + public interface IAsyncIListProvider : System.Collections.Generic.IAsyncEnumerable + { + System.Threading.Tasks.ValueTask GetCountAsync(bool onlyIfCheap, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.ValueTask ToArrayAsync(System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.ValueTask> ToListAsync(System.Threading.CancellationToken cancellationToken); + } +} \ No newline at end of file diff --git a/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemInteractiveAsyncProviders.received.cs b/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemInteractiveAsyncProviders.received.cs new file mode 100644 index 000000000..55fa24db5 --- /dev/null +++ b/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemInteractiveAsyncProviders.received.cs @@ -0,0 +1,82 @@ +[assembly: System.CLSCompliant(true)] +[assembly: System.Resources.NeutralResourcesLanguage("en-US")] +[assembly: System.Runtime.InteropServices.ComVisible(false)] +[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName=".NET 8.0")] +namespace System.Linq +{ + [System.Linq.LocalQueryMethodImplementationType(typeof(System.Linq.AsyncEnumerableEx))] + public static class AsyncQueryableEx + { + public static System.Linq.IAsyncQueryable Amb(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second) { } + public static System.Linq.IAsyncQueryable> Buffer(this System.Linq.IAsyncQueryable source, int count) { } + public static System.Linq.IAsyncQueryable> Buffer(this System.Linq.IAsyncQueryable source, int count, int skip) { } + public static System.Linq.IAsyncQueryable Catch(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second) { } + public static System.Linq.IAsyncQueryable Catch(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> handler) { } + public static System.Linq.IAsyncQueryable Catch(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>>> handler) { } + public static System.Linq.IAsyncQueryable Catch(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>>> handler) { } + public static System.Linq.IAsyncQueryable Concat(this System.Linq.IAsyncQueryable> sources) { } + public static System.Linq.IAsyncQueryable Distinct(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector) { } + public static System.Linq.IAsyncQueryable Distinct(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector) { } + public static System.Linq.IAsyncQueryable Distinct(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector) { } + public static System.Linq.IAsyncQueryable Distinct(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Linq.IAsyncQueryable Distinct(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Linq.IAsyncQueryable Distinct(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Linq.IAsyncQueryable DistinctUntilChanged(this System.Linq.IAsyncQueryable source) { } + public static System.Linq.IAsyncQueryable DistinctUntilChanged(this System.Linq.IAsyncQueryable source, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Linq.IAsyncQueryable DistinctUntilChanged(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector) { } + public static System.Linq.IAsyncQueryable DistinctUntilChanged(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector) { } + public static System.Linq.IAsyncQueryable DistinctUntilChanged(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector) { } + public static System.Linq.IAsyncQueryable DistinctUntilChanged(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Linq.IAsyncQueryable DistinctUntilChanged(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Linq.IAsyncQueryable DistinctUntilChanged(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Linq.IAsyncQueryable Do(this System.Linq.IAsyncQueryable source, System.IObserver observer) { } + public static System.Linq.IAsyncQueryable Do(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> onNext) { } + public static System.Linq.IAsyncQueryable Do(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> onNext) { } + public static System.Linq.IAsyncQueryable Do(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> onNext) { } + public static System.Linq.IAsyncQueryable Do(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> onNext, System.Action onCompleted) { } + public static System.Linq.IAsyncQueryable Do(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> onNext, System.Linq.Expressions.Expression> onError) { } + public static System.Linq.IAsyncQueryable Do(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> onNext, System.Linq.Expressions.Expression> onCompleted) { } + public static System.Linq.IAsyncQueryable Do(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> onNext, System.Linq.Expressions.Expression> onError) { } + public static System.Linq.IAsyncQueryable Do(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> onNext, System.Linq.Expressions.Expression> onCompleted) { } + public static System.Linq.IAsyncQueryable Do(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> onNext, System.Linq.Expressions.Expression> onError) { } + public static System.Linq.IAsyncQueryable Do(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> onNext, System.Linq.Expressions.Expression> onError, System.Action onCompleted) { } + public static System.Linq.IAsyncQueryable Do(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> onNext, System.Linq.Expressions.Expression> onError, System.Linq.Expressions.Expression> onCompleted) { } + public static System.Linq.IAsyncQueryable Do(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> onNext, System.Linq.Expressions.Expression> onError, System.Linq.Expressions.Expression> onCompleted) { } + public static System.Linq.IAsyncQueryable Expand(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector) { } + public static System.Linq.IAsyncQueryable Expand(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>>> selector) { } + public static System.Linq.IAsyncQueryable Expand(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>>> selector) { } + public static System.Linq.IAsyncQueryable Finally(this System.Linq.IAsyncQueryable source, System.Action finallyAction) { } + public static System.Linq.IAsyncQueryable Finally(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> finallyAction) { } + public static System.Linq.IAsyncQueryable IgnoreElements(this System.Linq.IAsyncQueryable source) { } + public static System.Threading.Tasks.ValueTask IsEmptyAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> MaxByAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> MaxByAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> MaxByAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> MaxByAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> MaxByAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> MaxByAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Linq.IAsyncQueryable Merge(this System.Linq.IAsyncQueryable> sources) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> MinByAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> MinByAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> MinByAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> MinByAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> MinByAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> MinByAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Linq.IAsyncQueryable OnErrorResumeNext(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second) { } + public static System.Linq.IAsyncQueryable Repeat(this System.Linq.IAsyncQueryable source) { } + public static System.Linq.IAsyncQueryable Repeat(this System.Linq.IAsyncQueryable source, int count) { } + public static System.Linq.IAsyncQueryable Retry(this System.Linq.IAsyncQueryable source) { } + public static System.Linq.IAsyncQueryable Retry(this System.Linq.IAsyncQueryable source, int retryCount) { } + public static System.Linq.IAsyncQueryable Scan(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> accumulator) { } + public static System.Linq.IAsyncQueryable Scan(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> accumulator) { } + public static System.Linq.IAsyncQueryable Scan(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> accumulator) { } + public static System.Linq.IAsyncQueryable Scan(this System.Linq.IAsyncQueryable source, TAccumulate seed, System.Linq.Expressions.Expression>> accumulator) { } + public static System.Linq.IAsyncQueryable Scan(this System.Linq.IAsyncQueryable source, TAccumulate seed, System.Linq.Expressions.Expression> accumulator) { } + public static System.Linq.IAsyncQueryable Scan(this System.Linq.IAsyncQueryable source, TAccumulate seed, System.Linq.Expressions.Expression>> accumulator) { } + public static System.Linq.IAsyncQueryable SelectMany(this System.Linq.IAsyncQueryable source, System.Collections.Generic.IAsyncEnumerable other) { } + public static System.Linq.IAsyncQueryable StartWith(this System.Linq.IAsyncQueryable source, params TSource[] values) { } + public static System.Linq.IAsyncQueryable Timeout(this System.Linq.IAsyncQueryable source, System.TimeSpan timeout) { } + } +} \ No newline at end of file diff --git a/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemLinqAsync.received.cs b/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemLinqAsync.received.cs new file mode 100644 index 000000000..e19c26338 --- /dev/null +++ b/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemLinqAsync.received.cs @@ -0,0 +1,703 @@ +[assembly: System.CLSCompliant(true)] +[assembly: System.Resources.NeutralResourcesLanguage("en-US")] +[assembly: System.Runtime.InteropServices.ComVisible(false)] +[assembly: System.Runtime.Versioning.TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName=".NET Standard 2.1")] +namespace System.Collections.Generic +{ + public static class AsyncEnumerator + { + public static System.Collections.Generic.IAsyncEnumerator Create(System.Func> moveNextAsync, System.Func getCurrent, System.Func disposeAsync) { } + public static System.Threading.Tasks.ValueTask MoveNextAsync(this System.Collections.Generic.IAsyncEnumerator source, System.Threading.CancellationToken cancellationToken) { } + public static System.Collections.Generic.IAsyncEnumerator WithCancellation(this System.Collections.Generic.IAsyncEnumerator source, System.Threading.CancellationToken cancellationToken) { } + } +} +namespace System.Linq +{ + public static class AsyncEnumerable + { + public static System.Threading.Tasks.ValueTask AggregateAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func accumulator, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AggregateAsync(this System.Collections.Generic.IAsyncEnumerable source, TAccumulate seed, System.Func accumulator, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AggregateAsync(this System.Collections.Generic.IAsyncEnumerable source, TAccumulate seed, System.Func accumulator, System.Func resultSelector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use AggregateAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, " + + "and the AggregateAwaitAsync now exists as overloads of AggregateAsync.")] + public static System.Threading.Tasks.ValueTask AggregateAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> accumulator, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use AggregateAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, " + + "and the AggregateAwaitAsync functionality now exists as overloads of AggregateAs" + + "ync.")] + public static System.Threading.Tasks.ValueTask AggregateAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, TAccumulate seed, System.Func> accumulator, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use AggregateAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, " + + "and the AggregateAwaitAsync functionality now exists as overloads of AggregateAs" + + "ync.")] + public static System.Threading.Tasks.ValueTask AggregateAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, TAccumulate seed, System.Func> accumulator, System.Func> resultSelector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use AggregateAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, " + + "and the AggregateAwaitWithCancellationAsync functionality now exists as overload" + + "s of AggregateAsync.")] + public static System.Threading.Tasks.ValueTask AggregateAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> accumulator, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use AggregateAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, " + + "and the AggregateAwaitWithCancellationAsync functionality now exists as overload" + + "s of AggregateAsync.")] + public static System.Threading.Tasks.ValueTask AggregateAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, TAccumulate seed, System.Func> accumulator, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use AggregateAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, " + + "and the AggregateAwaitWithCancellationAsync functionality now exists as overload" + + "s of AggregateAsync.")] + public static System.Threading.Tasks.ValueTask AggregateAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, TAccumulate seed, System.Func> accumulator, System.Func> resultSelector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AllAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use AllAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and th" + + "e AllAwaitAsync functionality now exists as overloads of All.")] + public static System.Threading.Tasks.ValueTask AllAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use AllAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and th" + + "e AllAwaitWithCancellationAsync functionality now exists as overloads of AllAsyn" + + "c.")] + public static System.Threading.Tasks.ValueTask AllAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AnyAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AnyAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use AnyAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and th" + + "e AnyAwaitAsync functionality now exists as overloads of AnyAsync.")] + public static System.Threading.Tasks.ValueTask AnyAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use AnyAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and th" + + "e AnyAwaitWithCancellationAsync functionality now exists as overloads of AnyAsyn" + + "c.")] + public static System.Threading.Tasks.ValueTask AnyAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Collections.Generic.IAsyncEnumerable Append(this System.Collections.Generic.IAsyncEnumerable source, TSource element) { } + public static System.Collections.Generic.IAsyncEnumerable AsAsyncEnumerable(this System.Collections.Generic.IAsyncEnumerable source) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Collections.Generic.IAsyncEnumerable Cast(this System.Collections.Generic.IAsyncEnumerable source) { } + public static System.Collections.Generic.IAsyncEnumerable Concat(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second) { } + public static System.Threading.Tasks.ValueTask ContainsAsync(this System.Collections.Generic.IAsyncEnumerable source, TSource value, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask ContainsAsync(this System.Collections.Generic.IAsyncEnumerable source, TSource value, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask CountAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask CountAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use CountAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the CountAwaitAsync functionality now exists as overloads of CountAsync.")] + public static System.Threading.Tasks.ValueTask CountAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use CountAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the CountAwaitWithCancellationAsync functionality now exists as overloads of Cou" + + "ntAsync.")] + public static System.Threading.Tasks.ValueTask CountAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Collections.Generic.IAsyncEnumerable Create(System.Func> getAsyncEnumerator) { } + public static System.Collections.Generic.IAsyncEnumerable DefaultIfEmpty(this System.Collections.Generic.IAsyncEnumerable source) { } + public static System.Collections.Generic.IAsyncEnumerable DefaultIfEmpty(this System.Collections.Generic.IAsyncEnumerable source, TSource defaultValue) { } + public static System.Collections.Generic.IAsyncEnumerable Distinct(this System.Collections.Generic.IAsyncEnumerable source) { } + public static System.Collections.Generic.IAsyncEnumerable Distinct(this System.Collections.Generic.IAsyncEnumerable source, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Threading.Tasks.ValueTask ElementAtAsync(this System.Collections.Generic.IAsyncEnumerable source, int index, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask ElementAtOrDefaultAsync(this System.Collections.Generic.IAsyncEnumerable source, int index, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Collections.Generic.IAsyncEnumerable Empty() { } + public static System.Collections.Generic.IAsyncEnumerable Except(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second) { } + public static System.Collections.Generic.IAsyncEnumerable Except(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Threading.Tasks.ValueTask FirstAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask FirstAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use FirstAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the FirstAwaitAsync functionality now exists as overloads of FirstAsync.")] + public static System.Threading.Tasks.ValueTask FirstAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use FirstAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the FirstAwaitWithCancellationAsync functionality now exists as overloads of Fir" + + "stAsync.")] + public static System.Threading.Tasks.ValueTask FirstAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask FirstOrDefaultAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask FirstOrDefaultAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use FirstOrDefaultAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumera" + + "ble, and the FirstOrDefaultAwaitAsync functionality now exists as overloads of F" + + "irstOrDefaultAsync.")] + public static System.Threading.Tasks.ValueTask FirstOrDefaultAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use FirstOrDefaultAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumera" + + "ble, and the FirstOrDefaultAwaitWithCancellationAsync functionality now exists a" + + "s overloads of FirstOrDefaultAsync.")] + public static System.Threading.Tasks.ValueTask FirstOrDefaultAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use the language support for async foreach instead.")] + public static System.Threading.Tasks.Task ForEachAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Action action, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use the language support for async foreach instead.")] + public static System.Threading.Tasks.Task ForEachAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Action action, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use the language support for async foreach instead.")] + public static System.Threading.Tasks.Task ForEachAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func action, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use the language support for async foreach instead.")] + public static System.Threading.Tasks.Task ForEachAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func action, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use the language support for async foreach instead.")] + public static System.Threading.Tasks.Task ForEachAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func action, System.Threading.CancellationToken cancellationToken) { } + [System.Obsolete("Use the language support for async foreach instead.")] + public static System.Threading.Tasks.Task ForEachAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func action, System.Threading.CancellationToken cancellationToken) { } + public static System.Collections.Generic.IAsyncEnumerable> GroupBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector) { } + public static System.Collections.Generic.IAsyncEnumerable> GroupBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Collections.Generic.IAsyncEnumerable> GroupBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Func elementSelector) { } + public static System.Collections.Generic.IAsyncEnumerable GroupBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Func, TResult> resultSelector) { } + public static System.Collections.Generic.IAsyncEnumerable> GroupBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Collections.Generic.IAsyncEnumerable GroupBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Func, TResult> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Collections.Generic.IAsyncEnumerable GroupBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Func elementSelector, System.Func, TResult> resultSelector) { } + public static System.Collections.Generic.IAsyncEnumerable GroupBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Func elementSelector, System.Func, TResult> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwait functionality now exists as overloads of GroupBy.")] + public static System.Collections.Generic.IAsyncEnumerable> GroupByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwait functionality now exists as overloads of GroupBy.")] + public static System.Collections.Generic.IAsyncEnumerable> GroupByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwait functionality now exists as overloads of GroupBy.")] + public static System.Collections.Generic.IAsyncEnumerable> GroupByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwait functionality now exists as overloads of GroupBy.")] + public static System.Collections.Generic.IAsyncEnumerable GroupByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func, System.Threading.Tasks.ValueTask> resultSelector) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwait functionality now exists as overloads of GroupBy.")] + public static System.Collections.Generic.IAsyncEnumerable> GroupByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwait functionality now exists as overloads of GroupBy.")] + public static System.Collections.Generic.IAsyncEnumerable GroupByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func, System.Threading.Tasks.ValueTask> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwait functionality now exists as overloads of GroupBy.")] + public static System.Collections.Generic.IAsyncEnumerable GroupByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Func, System.Threading.Tasks.ValueTask> resultSelector) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwait functionality now exists as overloads of GroupBy.")] + public static System.Collections.Generic.IAsyncEnumerable GroupByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Func, System.Threading.Tasks.ValueTask> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwaitWithCancellationAsync functionality now exists as overloads of Grou" + + "pBy.")] + public static System.Collections.Generic.IAsyncEnumerable> GroupByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwaitWithCancellationAsync functionality now exists as overloads of Grou" + + "pBy.")] + public static System.Collections.Generic.IAsyncEnumerable> GroupByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwaitWithCancellationAsync functionality now exists as overloads of Grou" + + "pBy.")] + public static System.Collections.Generic.IAsyncEnumerable> GroupByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwaitWithCancellationAsync functionality now exists as overloads of Grou" + + "pBy.")] + public static System.Collections.Generic.IAsyncEnumerable GroupByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask> resultSelector) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwaitWithCancellationAsync functionality now exists as overloads of Grou" + + "pBy.")] + public static System.Collections.Generic.IAsyncEnumerable> GroupByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwaitWithCancellationAsync functionality now exists as overloads of Grou" + + "pBy.")] + public static System.Collections.Generic.IAsyncEnumerable GroupByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwaitWithCancellationAsync functionality now exists as overloads of Grou" + + "pBy.")] + public static System.Collections.Generic.IAsyncEnumerable GroupByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Func, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask> resultSelector) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwaitWithCancellationAsync functionality now exists as overloads of Grou" + + "pBy.")] + public static System.Collections.Generic.IAsyncEnumerable GroupByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Func, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Collections.Generic.IAsyncEnumerable GroupJoin(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func outerKeySelector, System.Func innerKeySelector, System.Func, TResult> resultSelector) { } + public static System.Collections.Generic.IAsyncEnumerable GroupJoin(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func outerKeySelector, System.Func innerKeySelector, System.Func, TResult> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + [System.Obsolete("Use GroupJoin. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and t" + + "he GroupJoinAwait functionality now exists as overloads of GroupJoin.")] + public static System.Collections.Generic.IAsyncEnumerable GroupJoinAwait(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func> outerKeySelector, System.Func> innerKeySelector, System.Func, System.Threading.Tasks.ValueTask> resultSelector) { } + [System.Obsolete("Use GroupJoin. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and t" + + "he GroupJoinAwait functionality now exists as overloads of GroupJoin.")] + public static System.Collections.Generic.IAsyncEnumerable GroupJoinAwait(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func> outerKeySelector, System.Func> innerKeySelector, System.Func, System.Threading.Tasks.ValueTask> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + [System.Obsolete("Use GroupJoin. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and t" + + "he GroupJoinAwaitWithCancellation functionality now exists as overloads of Group" + + "Join.")] + public static System.Collections.Generic.IAsyncEnumerable GroupJoinAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func> outerKeySelector, System.Func> innerKeySelector, System.Func, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask> resultSelector) { } + [System.Obsolete("Use GroupJoin. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and t" + + "he GroupJoinAwaitWithCancellation functionality now exists as overloads of Group" + + "Join.")] + public static System.Collections.Generic.IAsyncEnumerable GroupJoinAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func> outerKeySelector, System.Func> innerKeySelector, System.Func, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Collections.Generic.IAsyncEnumerable Intersect(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second) { } + public static System.Collections.Generic.IAsyncEnumerable Intersect(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Collections.Generic.IAsyncEnumerable Join(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func outerKeySelector, System.Func innerKeySelector, System.Func resultSelector) { } + public static System.Collections.Generic.IAsyncEnumerable Join(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func outerKeySelector, System.Func innerKeySelector, System.Func resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + [System.Obsolete("Use Join. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the Jo" + + "inAwait functionality now exists as overloads of Join.")] + public static System.Collections.Generic.IAsyncEnumerable JoinAwait(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func> outerKeySelector, System.Func> innerKeySelector, System.Func> resultSelector) { } + [System.Obsolete("Use Join. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the Jo" + + "inAwait functionality now exists as overloads of Join.")] + public static System.Collections.Generic.IAsyncEnumerable JoinAwait(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func> outerKeySelector, System.Func> innerKeySelector, System.Func> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + [System.Obsolete("Use Join. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the Jo" + + "inAwaitWithCancellation functionality now exists as overloads of Join.")] + public static System.Collections.Generic.IAsyncEnumerable JoinAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func> outerKeySelector, System.Func> innerKeySelector, System.Func> resultSelector) { } + [System.Obsolete("Use Join. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the Jo" + + "inAwaitWithCancellation functionality now exists as overloads of Join.")] + public static System.Collections.Generic.IAsyncEnumerable JoinAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func> outerKeySelector, System.Func> innerKeySelector, System.Func> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Threading.Tasks.ValueTask LastAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask LastAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use LastAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and t" + + "he LastAwaitAsync functionality now exists as overloads of LastAsync.")] + public static System.Threading.Tasks.ValueTask LastAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use LastAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and t" + + "he LastAwaitWithCancellationAsync functionality now exists as overloads of LastA" + + "sync.")] + public static System.Threading.Tasks.ValueTask LastAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask LastOrDefaultAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask LastOrDefaultAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use LastOrDefaultAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerab" + + "le, and the LastOrDefaultAwaitAsync functionality now exists as overloads of Las" + + "tOrDefaultAsync.")] + public static System.Threading.Tasks.ValueTask LastOrDefaultAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use LastOrDefaultAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerab" + + "le, and the LastOrDefaultAwaitWithCancellationAsync functionality now exists as " + + "overloads of LastOrDefaultAsync.")] + public static System.Threading.Tasks.ValueTask LastOrDefaultAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask LongCountAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask LongCountAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use LongCountAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, " + + "and the LongCountAwaitAsync functionality now exists as overloads of LongCountAs" + + "ync.")] + public static System.Threading.Tasks.ValueTask LongCountAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use LongCountAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, " + + "and the LongCountAwaitWithCancellationAsync functionality now exists as overload" + + "s of LongCountAsync.")] + public static System.Threading.Tasks.ValueTask LongCountAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by the MaxAsync overload that took a selec" + + "tor callback now exists as an overload of MaxByAsync.")] + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitAsync now exists as an overload" + + " of MaxByAsync.")] + public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitAsync now exists as an overload" + + " of MaxByAsync.")] + public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitAsync now exists as an overload" + + " of MaxByAsync.")] + public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitAsync now exists as an overload" + + " of MaxByAsync.")] + public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitAsync now exists as an overload" + + " of MaxByAsync.")] + public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitAsync now exists as an overload" + + " of MaxByAsync.")] + public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitAsync now exists as an overload" + + " of MaxByAsync.")] + public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitAsync now exists as an overload" + + " of MaxByAsync.")] + public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitAsync now exists as an overload" + + " of MaxByAsync.")] + public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitAsync now exists as an overload" + + " of MaxByAsync.")] + public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitAsync now exists as an overload" + + " of MaxByAsync.")] + public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + + "s as an overload of MaxByAsync.")] + public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + + "s as an overload of MaxByAsync.")] + public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + + "s as an overload of MaxByAsync.")] + public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + + "s as an overload of MaxByAsync.")] + public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + + "s as an overload of MaxByAsync.")] + public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + + "s as an overload of MaxByAsync.")] + public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + + "s as an overload of MaxByAsync.")] + public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + + "s as an overload of MaxByAsync.")] + public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + + "s as an overload of MaxByAsync.")] + public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + + "s as an overload of MaxByAsync.")] + public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + + "s as an overload of MaxByAsync.")] + public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by the MinAsync overload that took a selec" + + "tor callback now exists as an overload of MinByAsync.")] + public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitAsync now exists as an overload" + + " of MinByAsync.")] + public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitAsync now exists as an overload" + + " of MinByAsync.")] + public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitAsync now exists as an overload" + + " of MinByAsync.")] + public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitAsync now exists as an overload" + + " of MinByAsync.")] + public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitAsync now exists as an overload" + + " of MinByAsync.")] + public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitAsync now exists as an overload" + + " of MinByAsync.")] + public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitAsync now exists as an overload" + + " of MinByAsync.")] + public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitAsync now exists as an overload" + + " of MinByAsync.")] + public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitAsync now exists as an overload" + + " of MinByAsync.")] + public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitAsync now exists as an overload" + + " of MinByAsync.")] + public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitAsync now exists as an overload" + + " of MinByAsync.")] + public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + + "s as an overload of MinByAsync.")] + public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + + "s as an overload of MinByAsync.")] + public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + + "s as an overload of MinByAsync.")] + public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + + "s as an overload of MinByAsync.")] + public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + + "s as an overload of MinByAsync.")] + public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + + "s as an overload of MinByAsync.")] + public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + + "s as an overload of MinByAsync.")] + public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + + "s as an overload of MinByAsync.")] + public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + + "s as an overload of MinByAsync.")] + public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + + "s as an overload of MinByAsync.")] + public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + + "s as an overload of MinByAsync.")] + public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Collections.Generic.IAsyncEnumerable OfType(this System.Collections.Generic.IAsyncEnumerable source) { } + public static System.Linq.IOrderedAsyncEnumerable OrderBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector) { } + public static System.Linq.IOrderedAsyncEnumerable OrderBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IComparer comparer) { } + public static System.Linq.IOrderedAsyncEnumerable OrderByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector) { } + public static System.Linq.IOrderedAsyncEnumerable OrderByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer comparer) { } + public static System.Linq.IOrderedAsyncEnumerable OrderByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector) { } + public static System.Linq.IOrderedAsyncEnumerable OrderByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer comparer) { } + public static System.Linq.IOrderedAsyncEnumerable OrderByDescending(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector) { } + public static System.Linq.IOrderedAsyncEnumerable OrderByDescending(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IComparer comparer) { } + public static System.Linq.IOrderedAsyncEnumerable OrderByDescendingAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector) { } + public static System.Linq.IOrderedAsyncEnumerable OrderByDescendingAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer comparer) { } + public static System.Linq.IOrderedAsyncEnumerable OrderByDescendingAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector) { } + public static System.Linq.IOrderedAsyncEnumerable OrderByDescendingAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer comparer) { } + public static System.Collections.Generic.IAsyncEnumerable Prepend(this System.Collections.Generic.IAsyncEnumerable source, TSource element) { } + public static System.Collections.Generic.IAsyncEnumerable Range(int start, int count) { } + public static System.Collections.Generic.IAsyncEnumerable Repeat(TResult element, int count) { } + public static System.Collections.Generic.IAsyncEnumerable Reverse(this System.Collections.Generic.IAsyncEnumerable source) { } + public static System.Collections.Generic.IAsyncEnumerable Select(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector) { } + public static System.Collections.Generic.IAsyncEnumerable Select(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector) { } + [System.Obsolete("Use Aggregate. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and t" + + "he AggregateAwait and AggregateAwaitWithCancellationAsync functionality now exis" + + "ts as overloads of Aggregate.")] + public static System.Collections.Generic.IAsyncEnumerable SelectAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector) { } + public static System.Collections.Generic.IAsyncEnumerable SelectAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector) { } + public static System.Collections.Generic.IAsyncEnumerable SelectAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector) { } + public static System.Collections.Generic.IAsyncEnumerable SelectAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector) { } + public static System.Collections.Generic.IAsyncEnumerable SelectMany(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector) { } + public static System.Collections.Generic.IAsyncEnumerable SelectMany(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector) { } + public static System.Collections.Generic.IAsyncEnumerable SelectMany(this System.Collections.Generic.IAsyncEnumerable source, System.Func> collectionSelector, System.Func resultSelector) { } + public static System.Collections.Generic.IAsyncEnumerable SelectMany(this System.Collections.Generic.IAsyncEnumerable source, System.Func> collectionSelector, System.Func resultSelector) { } + public static System.Collections.Generic.IAsyncEnumerable SelectManyAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> selector) { } + public static System.Collections.Generic.IAsyncEnumerable SelectManyAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> selector) { } + public static System.Collections.Generic.IAsyncEnumerable SelectManyAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> collectionSelector, System.Func> resultSelector) { } + public static System.Collections.Generic.IAsyncEnumerable SelectManyAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> collectionSelector, System.Func> resultSelector) { } + public static System.Collections.Generic.IAsyncEnumerable SelectManyAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> selector) { } + public static System.Collections.Generic.IAsyncEnumerable SelectManyAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> selector) { } + public static System.Collections.Generic.IAsyncEnumerable SelectManyAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> collectionSelector, System.Func> resultSelector) { } + public static System.Collections.Generic.IAsyncEnumerable SelectManyAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> collectionSelector, System.Func> resultSelector) { } + public static System.Threading.Tasks.ValueTask SequenceEqualAsync(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SequenceEqualAsync(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SingleAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SingleAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SingleAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SingleAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SingleOrDefaultAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SingleOrDefaultAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SingleOrDefaultAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SingleOrDefaultAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Collections.Generic.IAsyncEnumerable Skip(this System.Collections.Generic.IAsyncEnumerable source, int count) { } + public static System.Collections.Generic.IAsyncEnumerable SkipLast(this System.Collections.Generic.IAsyncEnumerable source, int count) { } + public static System.Collections.Generic.IAsyncEnumerable SkipWhile(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate) { } + public static System.Collections.Generic.IAsyncEnumerable SkipWhile(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate) { } + public static System.Collections.Generic.IAsyncEnumerable SkipWhileAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } + public static System.Collections.Generic.IAsyncEnumerable SkipWhileAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } + public static System.Collections.Generic.IAsyncEnumerable SkipWhileAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } + public static System.Collections.Generic.IAsyncEnumerable SkipWhileAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Collections.Generic.IAsyncEnumerable Take(this System.Collections.Generic.IAsyncEnumerable source, int count) { } + public static System.Collections.Generic.IAsyncEnumerable TakeLast(this System.Collections.Generic.IAsyncEnumerable source, int count) { } + public static System.Collections.Generic.IAsyncEnumerable TakeWhile(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate) { } + public static System.Collections.Generic.IAsyncEnumerable TakeWhile(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate) { } + public static System.Collections.Generic.IAsyncEnumerable TakeWhileAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } + public static System.Collections.Generic.IAsyncEnumerable TakeWhileAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } + public static System.Collections.Generic.IAsyncEnumerable TakeWhileAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } + public static System.Collections.Generic.IAsyncEnumerable TakeWhileAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } + public static System.Linq.IOrderedAsyncEnumerable ThenBy(this System.Linq.IOrderedAsyncEnumerable source, System.Func keySelector) { } + public static System.Linq.IOrderedAsyncEnumerable ThenBy(this System.Linq.IOrderedAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IComparer comparer) { } + public static System.Linq.IOrderedAsyncEnumerable ThenByAwait(this System.Linq.IOrderedAsyncEnumerable source, System.Func> keySelector) { } + public static System.Linq.IOrderedAsyncEnumerable ThenByAwait(this System.Linq.IOrderedAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer comparer) { } + public static System.Linq.IOrderedAsyncEnumerable ThenByAwaitWithCancellation(this System.Linq.IOrderedAsyncEnumerable source, System.Func> keySelector) { } + public static System.Linq.IOrderedAsyncEnumerable ThenByAwaitWithCancellation(this System.Linq.IOrderedAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer comparer) { } + public static System.Linq.IOrderedAsyncEnumerable ThenByDescending(this System.Linq.IOrderedAsyncEnumerable source, System.Func keySelector) { } + public static System.Linq.IOrderedAsyncEnumerable ThenByDescending(this System.Linq.IOrderedAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IComparer comparer) { } + public static System.Linq.IOrderedAsyncEnumerable ThenByDescendingAwait(this System.Linq.IOrderedAsyncEnumerable source, System.Func> keySelector) { } + public static System.Linq.IOrderedAsyncEnumerable ThenByDescendingAwait(this System.Linq.IOrderedAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer comparer) { } + public static System.Linq.IOrderedAsyncEnumerable ThenByDescendingAwaitWithCancellation(this System.Linq.IOrderedAsyncEnumerable source, System.Func> keySelector) { } + public static System.Linq.IOrderedAsyncEnumerable ThenByDescendingAwaitWithCancellation(this System.Linq.IOrderedAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer comparer) { } + public static System.Threading.Tasks.ValueTask ToArrayAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Collections.Generic.IAsyncEnumerable ToAsyncEnumerable(this System.Collections.Generic.IEnumerable source) { } + public static System.Collections.Generic.IAsyncEnumerable ToAsyncEnumerable(this System.IObservable source) { } + public static System.Collections.Generic.IAsyncEnumerable ToAsyncEnumerable(this System.Threading.Tasks.Task task) { } + public static System.Threading.Tasks.ValueTask> ToDictionaryAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Threading.CancellationToken cancellationToken = default) + where TKey : notnull { } + public static System.Threading.Tasks.ValueTask> ToDictionaryAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) + where TKey : notnull { } + public static System.Threading.Tasks.ValueTask> ToDictionaryAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Func elementSelector, System.Threading.CancellationToken cancellationToken = default) + where TKey : notnull { } + public static System.Threading.Tasks.ValueTask> ToDictionaryAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) + where TKey : notnull { } + public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Threading.CancellationToken cancellationToken = default) + where TKey : notnull { } + public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) + where TKey : notnull { } + public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Threading.CancellationToken cancellationToken = default) + where TKey : notnull { } + public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) + where TKey : notnull { } + public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Threading.CancellationToken cancellationToken = default) + where TKey : notnull { } + public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) + where TKey : notnull { } + public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Threading.CancellationToken cancellationToken = default) + where TKey : notnull { } + public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) + where TKey : notnull { } + public static System.Collections.Generic.IEnumerable ToEnumerable(this System.Collections.Generic.IAsyncEnumerable source) { } + public static System.Threading.Tasks.ValueTask> ToHashSetAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToHashSetAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToListAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToLookupAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToLookupAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToLookupAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Func elementSelector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToLookupAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToLookupAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToLookupAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToLookupAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToLookupAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToLookupAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToLookupAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToLookupAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToLookupAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.IObservable ToObservable(this System.Collections.Generic.IAsyncEnumerable source) { } + public static System.Collections.Generic.IAsyncEnumerable Union(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second) { } + public static System.Collections.Generic.IAsyncEnumerable Union(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Collections.Generic.IAsyncEnumerable Where(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate) { } + public static System.Collections.Generic.IAsyncEnumerable Where(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate) { } + public static System.Collections.Generic.IAsyncEnumerable WhereAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } + public static System.Collections.Generic.IAsyncEnumerable WhereAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } + public static System.Collections.Generic.IAsyncEnumerable WhereAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } + public static System.Collections.Generic.IAsyncEnumerable WhereAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } + [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { + "First", + "Second"})] + public static System.Collections.Generic.IAsyncEnumerable> Zip(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second) { } + public static System.Collections.Generic.IAsyncEnumerable Zip(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second, System.Func selector) { } + public static System.Collections.Generic.IAsyncEnumerable ZipAwait(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second, System.Func> selector) { } + public static System.Collections.Generic.IAsyncEnumerable ZipAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second, System.Func> selector) { } + } + public interface IAsyncGrouping : System.Collections.Generic.IAsyncEnumerable + { + TKey Key { get; } + } + [System.Obsolete("Use the definition of this type in the System.Interactive.Async NuGet package Sys" + + "tem.Linq.Async instead.")] + public interface IAsyncIListProvider : System.Collections.Generic.IAsyncEnumerable + { + System.Threading.Tasks.ValueTask GetCountAsync(bool onlyIfCheap, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.ValueTask ToArrayAsync(System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.ValueTask> ToListAsync(System.Threading.CancellationToken cancellationToken); + } + public interface IOrderedAsyncEnumerable : System.Collections.Generic.IAsyncEnumerable + { + System.Linq.IOrderedAsyncEnumerable CreateOrderedEnumerable(System.Func> keySelector, System.Collections.Generic.IComparer? comparer, bool descending); + System.Linq.IOrderedAsyncEnumerable CreateOrderedEnumerable(System.Func keySelector, System.Collections.Generic.IComparer? comparer, bool descending); + System.Linq.IOrderedAsyncEnumerable CreateOrderedEnumerable(System.Func> keySelector, System.Collections.Generic.IComparer? comparer, bool descending); + } +} \ No newline at end of file diff --git a/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemLinqAsyncQueryable.received.cs b/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemLinqAsyncQueryable.received.cs new file mode 100644 index 000000000..33196b616 --- /dev/null +++ b/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemLinqAsyncQueryable.received.cs @@ -0,0 +1,413 @@ +[assembly: System.CLSCompliant(true)] +[assembly: System.Resources.NeutralResourcesLanguage("en-US")] +[assembly: System.Runtime.InteropServices.ComVisible(false)] +[assembly: System.Runtime.Versioning.TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName=".NET Standard 2.1")] +namespace System.Linq +{ + public static class AsyncQueryable + { + public static System.Threading.Tasks.ValueTask AggregateAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> accumulator, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AggregateAsync(this System.Linq.IAsyncQueryable source, TAccumulate seed, System.Linq.Expressions.Expression> accumulator, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AggregateAsync(this System.Linq.IAsyncQueryable source, TAccumulate seed, System.Linq.Expressions.Expression> accumulator, System.Linq.Expressions.Expression> resultSelector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AggregateAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> accumulator, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AggregateAwaitAsync(this System.Linq.IAsyncQueryable source, TAccumulate seed, System.Linq.Expressions.Expression>> accumulator, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AggregateAwaitAsync(this System.Linq.IAsyncQueryable source, TAccumulate seed, System.Linq.Expressions.Expression>> accumulator, System.Linq.Expressions.Expression>> resultSelector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AggregateAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> accumulator, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AggregateAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, TAccumulate seed, System.Linq.Expressions.Expression>> accumulator, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AggregateAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, TAccumulate seed, System.Linq.Expressions.Expression>> accumulator, System.Linq.Expressions.Expression>> resultSelector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AllAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AllAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AllAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AnyAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AnyAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AnyAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AnyAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Linq.IAsyncQueryable Append(this System.Linq.IAsyncQueryable source, TSource element) { } + public static System.Linq.IAsyncQueryable AsAsyncQueryable(this System.Collections.Generic.IAsyncEnumerable source) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Linq.IAsyncQueryable Cast(this System.Linq.IAsyncQueryable source) { } + public static System.Linq.IAsyncQueryable Concat(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second) { } + public static System.Threading.Tasks.ValueTask ContainsAsync(this System.Linq.IAsyncQueryable source, TSource value, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask ContainsAsync(this System.Linq.IAsyncQueryable source, TSource value, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask CountAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask CountAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask CountAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask CountAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Linq.IAsyncQueryable DefaultIfEmpty(this System.Linq.IAsyncQueryable source) { } + public static System.Linq.IAsyncQueryable DefaultIfEmpty(this System.Linq.IAsyncQueryable source, TSource defaultValue) { } + public static System.Linq.IAsyncQueryable Distinct(this System.Linq.IAsyncQueryable source) { } + public static System.Linq.IAsyncQueryable Distinct(this System.Linq.IAsyncQueryable source, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Threading.Tasks.ValueTask ElementAtAsync(this System.Linq.IAsyncQueryable source, int index, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask ElementAtOrDefaultAsync(this System.Linq.IAsyncQueryable source, int index, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Linq.IAsyncQueryable Except(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second) { } + public static System.Linq.IAsyncQueryable Except(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Threading.Tasks.ValueTask FirstAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask FirstAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask FirstAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask FirstAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask FirstOrDefaultAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask FirstOrDefaultAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask FirstOrDefaultAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask FirstOrDefaultAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Linq.IAsyncQueryable> GroupBy(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector) { } + public static System.Linq.IAsyncQueryable> GroupBy(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Linq.IAsyncQueryable> GroupBy(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression> elementSelector) { } + public static System.Linq.IAsyncQueryable GroupBy(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression, TResult>> resultSelector) { } + public static System.Linq.IAsyncQueryable> GroupBy(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression> elementSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Linq.IAsyncQueryable GroupBy(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression, TResult>> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Linq.IAsyncQueryable GroupBy(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression> elementSelector, System.Linq.Expressions.Expression, TResult>> resultSelector) { } + public static System.Linq.IAsyncQueryable GroupBy(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression> elementSelector, System.Linq.Expressions.Expression, TResult>> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Linq.IAsyncQueryable> GroupByAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector) { } + public static System.Linq.IAsyncQueryable> GroupByAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Linq.IAsyncQueryable> GroupByAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector) { } + public static System.Linq.IAsyncQueryable GroupByAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression, System.Threading.Tasks.ValueTask>> resultSelector) { } + public static System.Linq.IAsyncQueryable> GroupByAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Linq.IAsyncQueryable GroupByAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression, System.Threading.Tasks.ValueTask>> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Linq.IAsyncQueryable GroupByAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector, System.Linq.Expressions.Expression, System.Threading.Tasks.ValueTask>> resultSelector) { } + public static System.Linq.IAsyncQueryable GroupByAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector, System.Linq.Expressions.Expression, System.Threading.Tasks.ValueTask>> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Linq.IAsyncQueryable> GroupByAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector) { } + public static System.Linq.IAsyncQueryable> GroupByAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Linq.IAsyncQueryable> GroupByAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector) { } + public static System.Linq.IAsyncQueryable GroupByAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask>> resultSelector) { } + public static System.Linq.IAsyncQueryable> GroupByAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Linq.IAsyncQueryable GroupByAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask>> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Linq.IAsyncQueryable GroupByAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector, System.Linq.Expressions.Expression, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask>> resultSelector) { } + public static System.Linq.IAsyncQueryable GroupByAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector, System.Linq.Expressions.Expression, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask>> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Linq.IAsyncQueryable GroupJoin(this System.Linq.IAsyncQueryable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Linq.Expressions.Expression> outerKeySelector, System.Linq.Expressions.Expression> innerKeySelector, System.Linq.Expressions.Expression, TResult>> resultSelector) { } + public static System.Linq.IAsyncQueryable GroupJoin(this System.Linq.IAsyncQueryable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Linq.Expressions.Expression> outerKeySelector, System.Linq.Expressions.Expression> innerKeySelector, System.Linq.Expressions.Expression, TResult>> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Linq.IAsyncQueryable GroupJoinAwait(this System.Linq.IAsyncQueryable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Linq.Expressions.Expression>> outerKeySelector, System.Linq.Expressions.Expression>> innerKeySelector, System.Linq.Expressions.Expression, System.Threading.Tasks.ValueTask>> resultSelector) { } + public static System.Linq.IAsyncQueryable GroupJoinAwait(this System.Linq.IAsyncQueryable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Linq.Expressions.Expression>> outerKeySelector, System.Linq.Expressions.Expression>> innerKeySelector, System.Linq.Expressions.Expression, System.Threading.Tasks.ValueTask>> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Linq.IAsyncQueryable GroupJoinAwaitWithCancellation(this System.Linq.IAsyncQueryable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Linq.Expressions.Expression>> outerKeySelector, System.Linq.Expressions.Expression>> innerKeySelector, System.Linq.Expressions.Expression, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask>> resultSelector) { } + public static System.Linq.IAsyncQueryable GroupJoinAwaitWithCancellation(this System.Linq.IAsyncQueryable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Linq.Expressions.Expression>> outerKeySelector, System.Linq.Expressions.Expression>> innerKeySelector, System.Linq.Expressions.Expression, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask>> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Linq.IAsyncQueryable Intersect(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second) { } + public static System.Linq.IAsyncQueryable Intersect(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Linq.IAsyncQueryable Join(this System.Linq.IAsyncQueryable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Linq.Expressions.Expression> outerKeySelector, System.Linq.Expressions.Expression> innerKeySelector, System.Linq.Expressions.Expression> resultSelector) { } + public static System.Linq.IAsyncQueryable Join(this System.Linq.IAsyncQueryable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Linq.Expressions.Expression> outerKeySelector, System.Linq.Expressions.Expression> innerKeySelector, System.Linq.Expressions.Expression> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Linq.IAsyncQueryable JoinAwait(this System.Linq.IAsyncQueryable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Linq.Expressions.Expression>> outerKeySelector, System.Linq.Expressions.Expression>> innerKeySelector, System.Linq.Expressions.Expression>> resultSelector) { } + public static System.Linq.IAsyncQueryable JoinAwait(this System.Linq.IAsyncQueryable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Linq.Expressions.Expression>> outerKeySelector, System.Linq.Expressions.Expression>> innerKeySelector, System.Linq.Expressions.Expression>> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Linq.IAsyncQueryable JoinAwaitWithCancellation(this System.Linq.IAsyncQueryable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Linq.Expressions.Expression>> outerKeySelector, System.Linq.Expressions.Expression>> innerKeySelector, System.Linq.Expressions.Expression>> resultSelector) { } + public static System.Linq.IAsyncQueryable JoinAwaitWithCancellation(this System.Linq.IAsyncQueryable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Linq.Expressions.Expression>> outerKeySelector, System.Linq.Expressions.Expression>> innerKeySelector, System.Linq.Expressions.Expression>> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Threading.Tasks.ValueTask LastAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask LastAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask LastAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask LastAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask LastOrDefaultAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask LastOrDefaultAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask LastOrDefaultAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask LastOrDefaultAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask LongCountAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask LongCountAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask LongCountAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask LongCountAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Linq.IAsyncQueryable OfType(this System.Linq.IAsyncQueryable source) { } + public static System.Linq.IOrderedAsyncQueryable OrderBy(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector) { } + public static System.Linq.IOrderedAsyncQueryable OrderBy(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IComparer? comparer) { } + public static System.Linq.IOrderedAsyncQueryable OrderByAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector) { } + public static System.Linq.IOrderedAsyncQueryable OrderByAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IComparer? comparer) { } + public static System.Linq.IOrderedAsyncQueryable OrderByAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector) { } + public static System.Linq.IOrderedAsyncQueryable OrderByAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IComparer? comparer) { } + public static System.Linq.IOrderedAsyncQueryable OrderByDescending(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector) { } + public static System.Linq.IOrderedAsyncQueryable OrderByDescending(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IComparer? comparer) { } + public static System.Linq.IOrderedAsyncQueryable OrderByDescendingAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector) { } + public static System.Linq.IOrderedAsyncQueryable OrderByDescendingAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IComparer? comparer) { } + public static System.Linq.IOrderedAsyncQueryable OrderByDescendingAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector) { } + public static System.Linq.IOrderedAsyncQueryable OrderByDescendingAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IComparer? comparer) { } + public static System.Linq.IAsyncQueryable Prepend(this System.Linq.IAsyncQueryable source, TSource element) { } + public static System.Linq.IAsyncQueryable Reverse(this System.Linq.IAsyncQueryable source) { } + public static System.Linq.IAsyncQueryable Select(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector) { } + public static System.Linq.IAsyncQueryable Select(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector) { } + public static System.Linq.IAsyncQueryable SelectAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector) { } + public static System.Linq.IAsyncQueryable SelectAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector) { } + public static System.Linq.IAsyncQueryable SelectAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector) { } + public static System.Linq.IAsyncQueryable SelectAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector) { } + public static System.Linq.IAsyncQueryable SelectMany(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector) { } + public static System.Linq.IAsyncQueryable SelectMany(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector) { } + public static System.Linq.IAsyncQueryable SelectMany(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> collectionSelector, System.Linq.Expressions.Expression> resultSelector) { } + public static System.Linq.IAsyncQueryable SelectMany(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> collectionSelector, System.Linq.Expressions.Expression> resultSelector) { } + public static System.Linq.IAsyncQueryable SelectManyAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>>> selector) { } + public static System.Linq.IAsyncQueryable SelectManyAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>>> selector) { } + public static System.Linq.IAsyncQueryable SelectManyAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>>> collectionSelector, System.Linq.Expressions.Expression>> resultSelector) { } + public static System.Linq.IAsyncQueryable SelectManyAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>>> collectionSelector, System.Linq.Expressions.Expression>> resultSelector) { } + public static System.Linq.IAsyncQueryable SelectManyAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>>> selector) { } + public static System.Linq.IAsyncQueryable SelectManyAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>>> selector) { } + public static System.Linq.IAsyncQueryable SelectManyAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>>> collectionSelector, System.Linq.Expressions.Expression>> resultSelector) { } + public static System.Linq.IAsyncQueryable SelectManyAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>>> collectionSelector, System.Linq.Expressions.Expression>> resultSelector) { } + public static System.Threading.Tasks.ValueTask SequenceEqualAsync(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SequenceEqualAsync(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SingleAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SingleAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SingleAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SingleAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SingleOrDefaultAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SingleOrDefaultAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SingleOrDefaultAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SingleOrDefaultAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Linq.IAsyncQueryable Skip(this System.Linq.IAsyncQueryable source, int count) { } + public static System.Linq.IAsyncQueryable SkipLast(this System.Linq.IAsyncQueryable source, int count) { } + public static System.Linq.IAsyncQueryable SkipWhile(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate) { } + public static System.Linq.IAsyncQueryable SkipWhile(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate) { } + public static System.Linq.IAsyncQueryable SkipWhileAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate) { } + public static System.Linq.IAsyncQueryable SkipWhileAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate) { } + public static System.Linq.IAsyncQueryable SkipWhileAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate) { } + public static System.Linq.IAsyncQueryable SkipWhileAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Linq.IAsyncQueryable Take(this System.Linq.IAsyncQueryable source, int count) { } + public static System.Linq.IAsyncQueryable TakeLast(this System.Linq.IAsyncQueryable source, int count) { } + public static System.Linq.IAsyncQueryable TakeWhile(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate) { } + public static System.Linq.IAsyncQueryable TakeWhile(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate) { } + public static System.Linq.IAsyncQueryable TakeWhileAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate) { } + public static System.Linq.IAsyncQueryable TakeWhileAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate) { } + public static System.Linq.IAsyncQueryable TakeWhileAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate) { } + public static System.Linq.IAsyncQueryable TakeWhileAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate) { } + public static System.Linq.IOrderedAsyncQueryable ThenBy(this System.Linq.IOrderedAsyncQueryable source, System.Linq.Expressions.Expression> keySelector) { } + public static System.Linq.IOrderedAsyncQueryable ThenBy(this System.Linq.IOrderedAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IComparer? comparer) { } + public static System.Linq.IOrderedAsyncQueryable ThenByAwait(this System.Linq.IOrderedAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector) { } + public static System.Linq.IOrderedAsyncQueryable ThenByAwait(this System.Linq.IOrderedAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IComparer? comparer) { } + public static System.Linq.IOrderedAsyncQueryable ThenByAwaitWithCancellation(this System.Linq.IOrderedAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector) { } + public static System.Linq.IOrderedAsyncQueryable ThenByAwaitWithCancellation(this System.Linq.IOrderedAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IComparer? comparer) { } + public static System.Linq.IOrderedAsyncQueryable ThenByDescending(this System.Linq.IOrderedAsyncQueryable source, System.Linq.Expressions.Expression> keySelector) { } + public static System.Linq.IOrderedAsyncQueryable ThenByDescending(this System.Linq.IOrderedAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IComparer? comparer) { } + public static System.Linq.IOrderedAsyncQueryable ThenByDescendingAwait(this System.Linq.IOrderedAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector) { } + public static System.Linq.IOrderedAsyncQueryable ThenByDescendingAwait(this System.Linq.IOrderedAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IComparer? comparer) { } + public static System.Linq.IOrderedAsyncQueryable ThenByDescendingAwaitWithCancellation(this System.Linq.IOrderedAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector) { } + public static System.Linq.IOrderedAsyncQueryable ThenByDescendingAwaitWithCancellation(this System.Linq.IOrderedAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IComparer? comparer) { } + public static System.Threading.Tasks.ValueTask ToArrayAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToDictionaryAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Threading.CancellationToken cancellationToken = default) + where TKey : notnull { } + public static System.Threading.Tasks.ValueTask> ToDictionaryAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) + where TKey : notnull { } + public static System.Threading.Tasks.ValueTask> ToDictionaryAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression> elementSelector, System.Threading.CancellationToken cancellationToken = default) + where TKey : notnull { } + public static System.Threading.Tasks.ValueTask> ToDictionaryAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression> elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) + where TKey : notnull { } + public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Threading.CancellationToken cancellationToken = default) + where TKey : notnull { } + public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) + where TKey : notnull { } + public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector, System.Threading.CancellationToken cancellationToken = default) + where TKey : notnull { } + public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) + where TKey : notnull { } + public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Threading.CancellationToken cancellationToken = default) + where TKey : notnull { } + public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) + where TKey : notnull { } + public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector, System.Threading.CancellationToken cancellationToken = default) + where TKey : notnull { } + public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) + where TKey : notnull { } + public static System.Threading.Tasks.ValueTask> ToHashSetAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToHashSetAsync(this System.Linq.IAsyncQueryable source, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToListAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToLookupAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToLookupAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToLookupAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression> elementSelector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToLookupAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression> elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToLookupAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToLookupAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToLookupAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToLookupAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToLookupAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToLookupAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToLookupAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask> ToLookupAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Linq.IAsyncQueryable Union(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second) { } + public static System.Linq.IAsyncQueryable Union(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second, System.Collections.Generic.IEqualityComparer? comparer) { } + public static System.Linq.IAsyncQueryable Where(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate) { } + public static System.Linq.IAsyncQueryable Where(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate) { } + public static System.Linq.IAsyncQueryable WhereAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate) { } + public static System.Linq.IAsyncQueryable WhereAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate) { } + public static System.Linq.IAsyncQueryable WhereAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate) { } + public static System.Linq.IAsyncQueryable WhereAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate) { } + public static System.Linq.IAsyncQueryable> Zip(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second) { } + public static System.Linq.IAsyncQueryable Zip(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second, System.Linq.Expressions.Expression> selector) { } + public static System.Linq.IAsyncQueryable ZipAwait(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second, System.Linq.Expressions.Expression>> selector) { } + public static System.Linq.IAsyncQueryable ZipAwaitWithCancellation(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second, System.Linq.Expressions.Expression>> selector) { } + } + public interface IAsyncQueryProvider + { + System.Linq.IAsyncQueryable CreateQuery(System.Linq.Expressions.Expression expression); + System.Threading.Tasks.ValueTask ExecuteAsync(System.Linq.Expressions.Expression expression, System.Threading.CancellationToken token); + } + public interface IAsyncQueryable + { + System.Type ElementType { get; } + System.Linq.Expressions.Expression Expression { get; } + System.Linq.IAsyncQueryProvider Provider { get; } + } + public interface IAsyncQueryable : System.Collections.Generic.IAsyncEnumerable, System.Linq.IAsyncQueryable { } + public interface IOrderedAsyncQueryable : System.Linq.IAsyncQueryable { } + public interface IOrderedAsyncQueryable : System.Collections.Generic.IAsyncEnumerable, System.Linq.IAsyncQueryable, System.Linq.IAsyncQueryable, System.Linq.IOrderedAsyncQueryable { } + [System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=false)] + public sealed class LocalQueryMethodImplementationTypeAttribute : System.Attribute + { + public LocalQueryMethodImplementationTypeAttribute(System.Type targetType) { } + public System.Type TargetType { get; } + } +} \ No newline at end of file From 8cbb5a5bfacc0ec8491c971e7e7bce611c6ac075 Mon Sep 17 00:00:00 2001 From: Ian Griffiths Date: Tue, 30 Sep 2025 13:57:42 +0100 Subject: [PATCH 06/10] Update pipeline to use .NET 10.0 SDK --- azure-pipelines.ix.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.ix.yml b/azure-pipelines.ix.yml index 5940b7f1a..556b14360 100644 --- a/azure-pipelines.ix.yml +++ b/azure-pipelines.ix.yml @@ -32,14 +32,14 @@ stages: vmImage: windows-latest steps: - task: UseDotNet@2 - displayName: Use .NET Core 8.x SDK + displayName: Use .NET Core 10.x SDK inputs: - version: 8.x + version: 10.x - task: UseDotNet@2 - displayName: .NET 6.0 runtime + displayName: .NET 8.0 runtime inputs: - version: '6.x' + version: '8.x' packageType: runtime - task: DotNetCoreCLI@2 From 4fda8d09bd4901fc030952dd8b9c9f64701d0932 Mon Sep 17 00:00:00 2001 From: Ian Griffiths Date: Tue, 30 Sep 2025 14:00:36 +0100 Subject: [PATCH 07/10] Set includePreviewVersions on .net 10 step --- azure-pipelines.ix.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.ix.yml b/azure-pipelines.ix.yml index 556b14360..4f2e59ea8 100644 --- a/azure-pipelines.ix.yml +++ b/azure-pipelines.ix.yml @@ -35,6 +35,7 @@ stages: displayName: Use .NET Core 10.x SDK inputs: version: 10.x + includePreviewVersions: true - task: UseDotNet@2 displayName: .NET 8.0 runtime From 37a08e9a17440057f6c3b748c7ea4230d0ef08e1 Mon Sep 17 00:00:00 2001 From: Ian Griffiths Date: Tue, 30 Sep 2025 15:56:46 +0100 Subject: [PATCH 08/10] Update approved APIs. Fix code gen discrepancies. Fix erroneous doc comment on ZIP --- .../System/Linq/IAsyncIListProvider.cs | 2 +- .../Linq/Operators/Average.Generated.cs | 1212 ++--------------- .../Linq/Operators/Average.Generated.tt | 163 --- .../System/Linq/IAsyncIListProvider.cs | 2 +- .../Linq/Operators/Average.Generated.cs | 40 +- .../Linq/Operators/Average.Generated.tt | 4 +- .../System/Linq/Operators/Sum.Generated.cs | 60 +- .../System/Linq/Operators/Sum.Generated.tt | 6 +- .../System/Linq/Operators/Zip.cs | 3 +- ...alTests.SystemInteractiveAsync.received.cs | 145 -- ...alTests.SystemInteractiveAsync.verified.cs | 16 +- ...ystemInteractiveAsyncProviders.received.cs | 82 -- ...ystemInteractiveAsyncProviders.verified.cs | 2 +- ...iApprovalTests.SystemLinqAsync.received.cs | 703 ---------- ...iApprovalTests.SystemLinqAsync.verified.cs | 479 ++++++- ...Tests.SystemLinqAsyncQueryable.received.cs | 413 ------ ...Tests.SystemLinqAsyncQueryable.verified.cs | 2 +- 17 files changed, 726 insertions(+), 2608 deletions(-) delete mode 100644 Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemInteractiveAsync.received.cs delete mode 100644 Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemInteractiveAsyncProviders.received.cs delete mode 100644 Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemLinqAsync.received.cs delete mode 100644 Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemLinqAsyncQueryable.received.cs diff --git a/Ix.NET/Source/System.Interactive.Async/System/Linq/IAsyncIListProvider.cs b/Ix.NET/Source/System.Interactive.Async/System/Linq/IAsyncIListProvider.cs index 052ba2b51..717dce945 100644 --- a/Ix.NET/Source/System.Interactive.Async/System/Linq/IAsyncIListProvider.cs +++ b/Ix.NET/Source/System.Interactive.Async/System/Linq/IAsyncIListProvider.cs @@ -24,7 +24,7 @@ namespace System.Linq /// the old version defined in the deprecated System.Linq.Async package) will continue to provide the /// same (unsupported) behaviour. /// - public interface IAsyncIListProvider : IAsyncEnumerable + internal interface IAsyncIListProvider : IAsyncEnumerable { /// /// Produce an array of the sequence through an optimized path. diff --git a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Average.Generated.cs b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Average.Generated.cs index a8cfe864a..cb32b4639 100644 --- a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Average.Generated.cs +++ b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Average.Generated.cs @@ -56,914 +56,9 @@ static async ValueTask Core(IAsyncEnumerable source, Func - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. - /// - /// The type of elements in the source sequence. - /// An async-enumerable sequence of values to compute the average of. - /// A transform function to invoke and await on each element of the source sequence. - /// An optional cancellation token for cancelling the sequence at any time. - /// A ValueTask containing the average of the sequence of values. - /// or is . - /// The source sequence is empty. - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - [GenerateAsyncOverload] - private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) - { - if (source == null) - throw Error.ArgumentNull(nameof(source)); - if (selector == null) - throw Error.ArgumentNull(nameof(selector)); - - return Core(source, selector, cancellationToken); - - static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) - { - await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) - { - if (!await e.MoveNextAsync()) - { - throw Error.NoElements(); - } - - long sum = await selector(e.Current).ConfigureAwait(false); - long count = 1; - checked - { - while (await e.MoveNextAsync()) - { - sum += await selector(e.Current).ConfigureAwait(false); - ++count; - } - } - - return (double)sum / count; - } - } - } - -#if !NO_DEEP_CANCELLATION - [GenerateAsyncOverload] - private static ValueTask AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) - { - if (source == null) - throw Error.ArgumentNull(nameof(source)); - if (selector == null) - throw Error.ArgumentNull(nameof(selector)); - - return Core(source, selector, cancellationToken); - - static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) - { - await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) - { - if (!await e.MoveNextAsync()) - { - throw Error.NoElements(); - } - - long sum = await selector(e.Current, cancellationToken).ConfigureAwait(false); - long count = 1; - checked - { - while (await e.MoveNextAsync()) - { - sum += await selector(e.Current, cancellationToken).ConfigureAwait(false); - ++count; - } - } - - return (double)sum / count; - } - } - } -#endif - - - /// - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. - /// - /// The type of the elements in the source sequence. - /// A sequence of values to calculate the average of. - /// A transform function to apply to each element. - /// The optional cancellation token to be used for cancelling the sequence at any time. - /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. - /// or is null. - /// (Asynchronous) The source sequence is empty. - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) - { - if (source == null) - throw Error.ArgumentNull(nameof(source)); - if (selector == null) - throw Error.ArgumentNull(nameof(selector)); - - return Core(source, selector, cancellationToken); - - static async ValueTask Core(IAsyncEnumerable source, Func selector, CancellationToken cancellationToken) - { - await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) - { - if (!await e.MoveNextAsync()) - { - throw Error.NoElements(); - } - - long sum = selector(e.Current); - long count = 1; - checked - { - while (await e.MoveNextAsync()) - { - sum += selector(e.Current); - ++count; - } - } - - return (double)sum / count; - } - } - } - - /// - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. - /// - /// The type of elements in the source sequence. - /// An async-enumerable sequence of values to compute the average of. - /// A transform function to invoke and await on each element of the source sequence. - /// An optional cancellation token for cancelling the sequence at any time. - /// A ValueTask containing the average of the sequence of values. - /// or is . - /// The source sequence is empty. - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - [GenerateAsyncOverload] - private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) - { - if (source == null) - throw Error.ArgumentNull(nameof(source)); - if (selector == null) - throw Error.ArgumentNull(nameof(selector)); - - return Core(source, selector, cancellationToken); - - static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) - { - await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) - { - if (!await e.MoveNextAsync()) - { - throw Error.NoElements(); - } - - long sum = await selector(e.Current).ConfigureAwait(false); - long count = 1; - checked - { - while (await e.MoveNextAsync()) - { - sum += await selector(e.Current).ConfigureAwait(false); - ++count; - } - } - - return (double)sum / count; - } - } - } - -#if !NO_DEEP_CANCELLATION - [GenerateAsyncOverload] - private static ValueTask AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) - { - if (source == null) - throw Error.ArgumentNull(nameof(source)); - if (selector == null) - throw Error.ArgumentNull(nameof(selector)); - - return Core(source, selector, cancellationToken); - - static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) - { - await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) - { - if (!await e.MoveNextAsync()) - { - throw Error.NoElements(); - } - - long sum = await selector(e.Current, cancellationToken).ConfigureAwait(false); - long count = 1; - checked - { - while (await e.MoveNextAsync()) - { - sum += await selector(e.Current, cancellationToken).ConfigureAwait(false); - ++count; - } - } - - return (double)sum / count; - } - } - } -#endif - - - /// - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. - /// - /// The type of the elements in the source sequence. - /// A sequence of values to calculate the average of. - /// A transform function to apply to each element. - /// The optional cancellation token to be used for cancelling the sequence at any time. - /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. - /// or is null. - /// (Asynchronous) The source sequence is empty. - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) - { - if (source == null) - throw Error.ArgumentNull(nameof(source)); - if (selector == null) - throw Error.ArgumentNull(nameof(selector)); - - return Core(source, selector, cancellationToken); - - static async ValueTask Core(IAsyncEnumerable source, Func selector, CancellationToken cancellationToken) - { - await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) - { - if (!await e.MoveNextAsync()) - { - throw Error.NoElements(); - } - - double sum = selector(e.Current); - long count = 1; - checked - { - while (await e.MoveNextAsync()) - { - sum += selector(e.Current); - ++count; - } - } - - return (float)(sum / count); - } - } - } - - /// - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. - /// - /// The type of elements in the source sequence. - /// An async-enumerable sequence of values to compute the average of. - /// A transform function to invoke and await on each element of the source sequence. - /// An optional cancellation token for cancelling the sequence at any time. - /// A ValueTask containing the average of the sequence of values. - /// or is . - /// The source sequence is empty. - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - [GenerateAsyncOverload] - private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) - { - if (source == null) - throw Error.ArgumentNull(nameof(source)); - if (selector == null) - throw Error.ArgumentNull(nameof(selector)); - - return Core(source, selector, cancellationToken); - - static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) - { - await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) - { - if (!await e.MoveNextAsync()) - { - throw Error.NoElements(); - } - - double sum = await selector(e.Current).ConfigureAwait(false); - long count = 1; - checked - { - while (await e.MoveNextAsync()) - { - sum += await selector(e.Current).ConfigureAwait(false); - ++count; - } - } - - return (float)(sum / count); - } - } - } - -#if !NO_DEEP_CANCELLATION - [GenerateAsyncOverload] - private static ValueTask AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) - { - if (source == null) - throw Error.ArgumentNull(nameof(source)); - if (selector == null) - throw Error.ArgumentNull(nameof(selector)); - - return Core(source, selector, cancellationToken); - - static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) - { - await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) - { - if (!await e.MoveNextAsync()) - { - throw Error.NoElements(); - } - - double sum = await selector(e.Current, cancellationToken).ConfigureAwait(false); - long count = 1; - checked - { - while (await e.MoveNextAsync()) - { - sum += await selector(e.Current, cancellationToken).ConfigureAwait(false); - ++count; - } - } - - return (float)(sum / count); - } - } - } -#endif - - - /// - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. - /// - /// The type of the elements in the source sequence. - /// A sequence of values to calculate the average of. - /// A transform function to apply to each element. - /// The optional cancellation token to be used for cancelling the sequence at any time. - /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. - /// or is null. - /// (Asynchronous) The source sequence is empty. - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) - { - if (source == null) - throw Error.ArgumentNull(nameof(source)); - if (selector == null) - throw Error.ArgumentNull(nameof(selector)); - - return Core(source, selector, cancellationToken); - - static async ValueTask Core(IAsyncEnumerable source, Func selector, CancellationToken cancellationToken) - { - await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) - { - if (!await e.MoveNextAsync()) - { - throw Error.NoElements(); - } - - double sum = selector(e.Current); - long count = 1; - checked - { - while (await e.MoveNextAsync()) - { - sum += selector(e.Current); - ++count; - } - } - - return sum / count; - } - } - } - - /// - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. - /// - /// The type of elements in the source sequence. - /// An async-enumerable sequence of values to compute the average of. - /// A transform function to invoke and await on each element of the source sequence. - /// An optional cancellation token for cancelling the sequence at any time. - /// A ValueTask containing the average of the sequence of values. - /// or is . - /// The source sequence is empty. - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - [GenerateAsyncOverload] - private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) - { - if (source == null) - throw Error.ArgumentNull(nameof(source)); - if (selector == null) - throw Error.ArgumentNull(nameof(selector)); - - return Core(source, selector, cancellationToken); - - static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) - { - await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) - { - if (!await e.MoveNextAsync()) - { - throw Error.NoElements(); - } - - double sum = await selector(e.Current).ConfigureAwait(false); - long count = 1; - checked - { - while (await e.MoveNextAsync()) - { - sum += await selector(e.Current).ConfigureAwait(false); - ++count; - } - } - - return sum / count; - } - } - } - -#if !NO_DEEP_CANCELLATION - [GenerateAsyncOverload] - private static ValueTask AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) - { - if (source == null) - throw Error.ArgumentNull(nameof(source)); - if (selector == null) - throw Error.ArgumentNull(nameof(selector)); - - return Core(source, selector, cancellationToken); - - static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) - { - await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) - { - if (!await e.MoveNextAsync()) - { - throw Error.NoElements(); - } - - double sum = await selector(e.Current, cancellationToken).ConfigureAwait(false); - long count = 1; - checked - { - while (await e.MoveNextAsync()) - { - sum += await selector(e.Current, cancellationToken).ConfigureAwait(false); - ++count; - } - } - - return sum / count; - } - } - } -#endif - - - /// - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. - /// - /// The type of the elements in the source sequence. - /// A sequence of values to calculate the average of. - /// A transform function to apply to each element. - /// The optional cancellation token to be used for cancelling the sequence at any time. - /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. - /// or is null. - /// (Asynchronous) The source sequence is empty. - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) - { - if (source == null) - throw Error.ArgumentNull(nameof(source)); - if (selector == null) - throw Error.ArgumentNull(nameof(selector)); - - return Core(source, selector, cancellationToken); - - static async ValueTask Core(IAsyncEnumerable source, Func selector, CancellationToken cancellationToken) - { - await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) - { - if (!await e.MoveNextAsync()) - { - throw Error.NoElements(); - } - - decimal sum = selector(e.Current); - long count = 1; - checked - { - while (await e.MoveNextAsync()) - { - sum += selector(e.Current); - ++count; - } - } - - return sum / count; - } - } - } - - /// - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. - /// - /// The type of elements in the source sequence. - /// An async-enumerable sequence of values to compute the average of. - /// A transform function to invoke and await on each element of the source sequence. - /// An optional cancellation token for cancelling the sequence at any time. - /// A ValueTask containing the average of the sequence of values. - /// or is . - /// The source sequence is empty. - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - [GenerateAsyncOverload] - private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) - { - if (source == null) - throw Error.ArgumentNull(nameof(source)); - if (selector == null) - throw Error.ArgumentNull(nameof(selector)); - - return Core(source, selector, cancellationToken); - - static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) - { - await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) - { - if (!await e.MoveNextAsync()) - { - throw Error.NoElements(); - } - - decimal sum = await selector(e.Current).ConfigureAwait(false); - long count = 1; - checked - { - while (await e.MoveNextAsync()) - { - sum += await selector(e.Current).ConfigureAwait(false); - ++count; - } - } - - return sum / count; - } - } - } - -#if !NO_DEEP_CANCELLATION - [GenerateAsyncOverload] - private static ValueTask AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) - { - if (source == null) - throw Error.ArgumentNull(nameof(source)); - if (selector == null) - throw Error.ArgumentNull(nameof(selector)); - - return Core(source, selector, cancellationToken); - - static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) - { - await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) - { - if (!await e.MoveNextAsync()) - { - throw Error.NoElements(); - } - - decimal sum = await selector(e.Current, cancellationToken).ConfigureAwait(false); - long count = 1; - checked - { - while (await e.MoveNextAsync()) - { - sum += await selector(e.Current, cancellationToken).ConfigureAwait(false); - ++count; - } - } - - return sum / count; - } - } - } -#endif - - - /// - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. - /// - /// The type of the elements in the source sequence. - /// A sequence of values to calculate the average of. - /// A transform function to apply to each element. - /// The optional cancellation token to be used for cancelling the sequence at any time. - /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. - /// or is null. - /// (Asynchronous) The source sequence is empty. - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) - { - if (source == null) - throw Error.ArgumentNull(nameof(source)); - if (selector == null) - throw Error.ArgumentNull(nameof(selector)); - - return Core(source, selector, cancellationToken); - - static async ValueTask Core(IAsyncEnumerable source, Func selector, CancellationToken cancellationToken) - { - await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) - { - while (await e.MoveNextAsync()) - { - var v = selector(e.Current); - if (v.HasValue) - { - long sum = v.GetValueOrDefault(); - long count = 1; - checked - { - while (await e.MoveNextAsync()) - { - v = selector(e.Current); - if (v.HasValue) - { - sum += v.GetValueOrDefault(); - ++count; - } - } - } - - return (double)sum / count; - } - } - } - - return null; - } - } - - /// - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. - /// - /// The type of elements in the source sequence. - /// An async-enumerable sequence of values to compute the average of. - /// A transform function to invoke and await on each element of the source sequence. - /// An optional cancellation token for cancelling the sequence at any time. - /// A ValueTask containing the average of the sequence of values. - /// or is . - /// The source sequence is empty. - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - [GenerateAsyncOverload] - private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) - { - if (source == null) - throw Error.ArgumentNull(nameof(source)); - if (selector == null) - throw Error.ArgumentNull(nameof(selector)); - - return Core(source, selector, cancellationToken); - - static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) - { - await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) - { - while (await e.MoveNextAsync()) - { - var v = await selector(e.Current).ConfigureAwait(false); - if (v.HasValue) - { - long sum = v.GetValueOrDefault(); - long count = 1; - checked - { - while (await e.MoveNextAsync()) - { - v = await selector(e.Current).ConfigureAwait(false); - if (v.HasValue) - { - sum += v.GetValueOrDefault(); - ++count; - } - } - } - - return (double)sum / count; - } - } - } - - return null; - } - } - -#if !NO_DEEP_CANCELLATION - [GenerateAsyncOverload] - private static ValueTask AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) - { - if (source == null) - throw Error.ArgumentNull(nameof(source)); - if (selector == null) - throw Error.ArgumentNull(nameof(selector)); - - return Core(source, selector, cancellationToken); - - static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) - { - await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) - { - while (await e.MoveNextAsync()) - { - var v = await selector(e.Current, cancellationToken).ConfigureAwait(false); - if (v.HasValue) - { - long sum = v.GetValueOrDefault(); - long count = 1; - checked - { - while (await e.MoveNextAsync()) - { - v = await selector(e.Current, cancellationToken).ConfigureAwait(false); - if (v.HasValue) - { - sum += v.GetValueOrDefault(); - ++count; - } - } - } - - return (double)sum / count; - } - } - } - - return null; - } - } -#endif - - - /// - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. - /// - /// The type of the elements in the source sequence. - /// A sequence of values to calculate the average of. - /// A transform function to apply to each element. - /// The optional cancellation token to be used for cancelling the sequence at any time. - /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. - /// or is null. - /// (Asynchronous) The source sequence is empty. - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) - { - if (source == null) - throw Error.ArgumentNull(nameof(source)); - if (selector == null) - throw Error.ArgumentNull(nameof(selector)); - - return Core(source, selector, cancellationToken); - - static async ValueTask Core(IAsyncEnumerable source, Func selector, CancellationToken cancellationToken) - { - await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) - { - while (await e.MoveNextAsync()) - { - var v = selector(e.Current); - if (v.HasValue) - { - long sum = v.GetValueOrDefault(); - long count = 1; - checked - { - while (await e.MoveNextAsync()) - { - v = selector(e.Current); - if (v.HasValue) - { - sum += v.GetValueOrDefault(); - ++count; - } - } - } - - return (double)sum / count; - } - } - } - - return null; - } - } - - /// - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. - /// - /// The type of elements in the source sequence. - /// An async-enumerable sequence of values to compute the average of. - /// A transform function to invoke and await on each element of the source sequence. - /// An optional cancellation token for cancelling the sequence at any time. - /// A ValueTask containing the average of the sequence of values. - /// or is . - /// The source sequence is empty. - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - [GenerateAsyncOverload] - private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) - { - if (source == null) - throw Error.ArgumentNull(nameof(source)); - if (selector == null) - throw Error.ArgumentNull(nameof(selector)); - - return Core(source, selector, cancellationToken); - - static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) - { - await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) - { - while (await e.MoveNextAsync()) - { - var v = await selector(e.Current).ConfigureAwait(false); - if (v.HasValue) - { - long sum = v.GetValueOrDefault(); - long count = 1; - checked - { - while (await e.MoveNextAsync()) - { - v = await selector(e.Current).ConfigureAwait(false); - if (v.HasValue) - { - sum += v.GetValueOrDefault(); - ++count; - } - } - } - - return (double)sum / count; - } - } - } - - return null; - } - } - -#if !NO_DEEP_CANCELLATION - [GenerateAsyncOverload] - private static ValueTask AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) - { - if (source == null) - throw Error.ArgumentNull(nameof(source)); - if (selector == null) - throw Error.ArgumentNull(nameof(selector)); - - return Core(source, selector, cancellationToken); - - static async ValueTask Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) - { - await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) - { - while (await e.MoveNextAsync()) - { - var v = await selector(e.Current, cancellationToken).ConfigureAwait(false); - if (v.HasValue) - { - long sum = v.GetValueOrDefault(); - long count = 1; - checked - { - while (await e.MoveNextAsync()) - { - v = await selector(e.Current, cancellationToken).ConfigureAwait(false); - if (v.HasValue) - { - sum += v.GetValueOrDefault(); - ++count; - } - } - } - - return (double)sum / count; - } - } - } - - return null; - } - } -#endif - /// - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. /// /// The type of the elements in the source sequence. /// A sequence of values to calculate the average of. @@ -973,7 +68,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func or is null. /// (Asynchronous) The source sequence is empty. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -982,52 +77,44 @@ static async ValueTask Core(IAsyncEnumerable source, Func Core(IAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + static async ValueTask Core(IAsyncEnumerable source, Func selector, CancellationToken cancellationToken) { await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) { - while (await e.MoveNextAsync()) + if (!await e.MoveNextAsync()) { - var v = selector(e.Current); - if (v.HasValue) - { - double sum = v.GetValueOrDefault(); - long count = 1; - checked - { - while (await e.MoveNextAsync()) - { - v = selector(e.Current); - if (v.HasValue) - { - sum += v.GetValueOrDefault(); - ++count; - } - } - } + throw Error.NoElements(); + } - return (float)(sum / count); + long sum = selector(e.Current); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + sum += selector(e.Current); + ++count; } } - } - return null; + return (double)sum / count; + } } } + /// - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. /// - /// The type of elements in the source sequence. - /// An async-enumerable sequence of values to compute the average of. - /// A transform function to invoke and await on each element of the source sequence. - /// An optional cancellation token for cancelling the sequence at any time. - /// A ValueTask containing the average of the sequence of values. - /// or is . - /// The source sequence is empty. + /// The type of the elements in the source sequence. + /// A sequence of values to calculate the average of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. + /// or is null. + /// (Asynchronous) The source sequence is empty. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - [GenerateAsyncOverload] - private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1036,42 +123,44 @@ static async ValueTask Core(IAsyncEnumerable source, Func Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + static async ValueTask Core(IAsyncEnumerable source, Func selector, CancellationToken cancellationToken) { await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) { - while (await e.MoveNextAsync()) + if (!await e.MoveNextAsync()) { - var v = await selector(e.Current).ConfigureAwait(false); - if (v.HasValue) - { - double sum = v.GetValueOrDefault(); - long count = 1; - checked - { - while (await e.MoveNextAsync()) - { - v = await selector(e.Current).ConfigureAwait(false); - if (v.HasValue) - { - sum += v.GetValueOrDefault(); - ++count; - } - } - } + throw Error.NoElements(); + } - return (float)(sum / count); + double sum = selector(e.Current); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + sum += selector(e.Current); + ++count; } } - } - return null; + return (float)(sum / count); + } } } -#if !NO_DEEP_CANCELLATION - [GenerateAsyncOverload] - private static ValueTask AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + + /// + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values to calculate the average of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. + /// or is null. + /// (Asynchronous) The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1080,43 +169,34 @@ static async ValueTask Core(IAsyncEnumerable source, Func Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + static async ValueTask Core(IAsyncEnumerable source, Func selector, CancellationToken cancellationToken) { await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) { - while (await e.MoveNextAsync()) + if (!await e.MoveNextAsync()) { - var v = await selector(e.Current, cancellationToken).ConfigureAwait(false); - if (v.HasValue) - { - double sum = v.GetValueOrDefault(); - long count = 1; - checked - { - while (await e.MoveNextAsync()) - { - v = await selector(e.Current, cancellationToken).ConfigureAwait(false); - if (v.HasValue) - { - sum += v.GetValueOrDefault(); - ++count; - } - } - } + throw Error.NoElements(); + } - return (float)(sum / count); + double sum = selector(e.Current); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + sum += selector(e.Current); + ++count; } } - } - return null; + return sum / count; + } } } -#endif /// - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. /// /// The type of the elements in the source sequence. /// A sequence of values to calculate the average of. @@ -1126,7 +206,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func or is null. /// (Asynchronous) The source sequence is empty. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1135,52 +215,44 @@ static async ValueTask Core(IAsyncEnumerable source, Func Core(IAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + static async ValueTask Core(IAsyncEnumerable source, Func selector, CancellationToken cancellationToken) { await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) { - while (await e.MoveNextAsync()) + if (!await e.MoveNextAsync()) { - var v = selector(e.Current); - if (v.HasValue) - { - double sum = v.GetValueOrDefault(); - long count = 1; - checked - { - while (await e.MoveNextAsync()) - { - v = selector(e.Current); - if (v.HasValue) - { - sum += v.GetValueOrDefault(); - ++count; - } - } - } + throw Error.NoElements(); + } - return sum / count; + decimal sum = selector(e.Current); + long count = 1; + checked + { + while (await e.MoveNextAsync()) + { + sum += selector(e.Current); + ++count; } } - } - return null; + return sum / count; + } } } + /// - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. /// - /// The type of elements in the source sequence. - /// An async-enumerable sequence of values to compute the average of. - /// A transform function to invoke and await on each element of the source sequence. - /// An optional cancellation token for cancelling the sequence at any time. - /// A ValueTask containing the average of the sequence of values. - /// or is . - /// The source sequence is empty. + /// The type of the elements in the source sequence. + /// A sequence of values to calculate the average of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. + /// or is null. + /// (Asynchronous) The source sequence is empty. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - [GenerateAsyncOverload] - private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1189,22 +261,22 @@ static async ValueTask Core(IAsyncEnumerable source, Func Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + static async ValueTask Core(IAsyncEnumerable source, Func selector, CancellationToken cancellationToken) { await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) { while (await e.MoveNextAsync()) { - var v = await selector(e.Current).ConfigureAwait(false); + var v = selector(e.Current); if (v.HasValue) { - double sum = v.GetValueOrDefault(); + long sum = v.GetValueOrDefault(); long count = 1; checked { while (await e.MoveNextAsync()) { - v = await selector(e.Current).ConfigureAwait(false); + v = selector(e.Current); if (v.HasValue) { sum += v.GetValueOrDefault(); @@ -1213,7 +285,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func Core(IAsyncEnumerable source, Func AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + + /// + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values to calculate the average of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. + /// or is null. + /// (Asynchronous) The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1233,22 +315,22 @@ static async ValueTask Core(IAsyncEnumerable source, Func Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + static async ValueTask Core(IAsyncEnumerable source, Func selector, CancellationToken cancellationToken) { await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) { while (await e.MoveNextAsync()) { - var v = await selector(e.Current, cancellationToken).ConfigureAwait(false); + var v = selector(e.Current); if (v.HasValue) { - double sum = v.GetValueOrDefault(); + long sum = v.GetValueOrDefault(); long count = 1; checked { while (await e.MoveNextAsync()) { - v = await selector(e.Current, cancellationToken).ConfigureAwait(false); + v = selector(e.Current); if (v.HasValue) { sum += v.GetValueOrDefault(); @@ -1257,7 +339,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func Core(IAsyncEnumerable source, Func - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. /// /// The type of the elements in the source sequence. /// A sequence of values to calculate the average of. @@ -1279,7 +360,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func or is null. /// (Asynchronous) The source sequence is empty. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1288,7 +369,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func Core(IAsyncEnumerable source, Func selector, CancellationToken cancellationToken) + static async ValueTask Core(IAsyncEnumerable source, Func selector, CancellationToken cancellationToken) { await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) { @@ -1297,7 +378,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func Core(IAsyncEnumerable source, Func Core(IAsyncEnumerable source, Func - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. /// - /// The type of elements in the source sequence. - /// An async-enumerable sequence of values to compute the average of. - /// A transform function to invoke and await on each element of the source sequence. - /// An optional cancellation token for cancelling the sequence at any time. - /// A ValueTask containing the average of the sequence of values. - /// or is . - /// The source sequence is empty. + /// The type of the elements in the source sequence. + /// A sequence of values to calculate the average of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. + /// or is null. + /// (Asynchronous) The source sequence is empty. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - [GenerateAsyncOverload] - private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1342,22 +423,22 @@ static async ValueTask Core(IAsyncEnumerable source, Func Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + static async ValueTask Core(IAsyncEnumerable source, Func selector, CancellationToken cancellationToken) { await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) { while (await e.MoveNextAsync()) { - var v = await selector(e.Current).ConfigureAwait(false); + var v = selector(e.Current); if (v.HasValue) { - decimal sum = v.GetValueOrDefault(); + double sum = v.GetValueOrDefault(); long count = 1; checked { while (await e.MoveNextAsync()) { - v = await selector(e.Current).ConfigureAwait(false); + v = selector(e.Current); if (v.HasValue) { sum += v.GetValueOrDefault(); @@ -1375,9 +456,19 @@ static async ValueTask Core(IAsyncEnumerable source, Func AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + + /// + /// Computes the average of an async-enumerable sequence of values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values to calculate the average of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. + /// or is null. + /// (Asynchronous) The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. + public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1386,13 +477,13 @@ static async ValueTask Core(IAsyncEnumerable source, Func Core(IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken) + static async ValueTask Core(IAsyncEnumerable source, Func selector, CancellationToken cancellationToken) { await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) { while (await e.MoveNextAsync()) { - var v = await selector(e.Current, cancellationToken).ConfigureAwait(false); + var v = selector(e.Current); if (v.HasValue) { decimal sum = v.GetValueOrDefault(); @@ -1401,7 +492,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func Core(IAsyncEnumerable source, Func - /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. - /// - /// The type of elements in the source sequence. - /// An async-enumerable sequence of values to compute the average of. - /// A transform function to invoke and await on each element of the source sequence. - /// An optional cancellation token for cancelling the sequence at any time. - /// A ValueTask containing the average of the sequence of values. - /// or is . - /// The source sequence is empty. - /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. - [GenerateAsyncOverload] - private static ValueTask<<#=o.res#>> AverageAwaitAsyncCore(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) - { - if (source == null) - throw Error.ArgumentNull(nameof(source)); - if (selector == null) - throw Error.ArgumentNull(nameof(selector)); - - return Core(source, selector, cancellationToken); - - static async ValueTask<<#=o.res#>> Core(IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken) - { -<# -if (isNullable) -{ -#> - await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) - { - while (await e.MoveNextAsync()) - { - var v = await selector(e.Current).ConfigureAwait(false); - if (v.HasValue) - { - <#=o.sum#> sum = v.GetValueOrDefault(); - long count = 1; - checked - { - while (await e.MoveNextAsync()) - { - v = await selector(e.Current).ConfigureAwait(false); - if (v.HasValue) - { - sum += v.GetValueOrDefault(); - ++count; - } - } - } - - return <#=res#>; - } - } - } - - return null; -<# -} -else -{ -#> - await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) - { - if (!await e.MoveNextAsync()) - { - throw Error.NoElements(); - } - - <#=o.sum#> sum = await selector(e.Current).ConfigureAwait(false); - long count = 1; - checked - { - while (await e.MoveNextAsync()) - { - sum += await selector(e.Current).ConfigureAwait(false); - ++count; - } - } - - return <#=res#>; - } -<# -} -#> - } - } - -#if !NO_DEEP_CANCELLATION - [GenerateAsyncOverload] - private static ValueTask<<#=o.res#>> AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) - { - if (source == null) - throw Error.ArgumentNull(nameof(source)); - if (selector == null) - throw Error.ArgumentNull(nameof(selector)); - - return Core(source, selector, cancellationToken); - - static async ValueTask<<#=o.res#>> Core(IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken) - { -<# -if (isNullable) -{ -#> - await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) - { - while (await e.MoveNextAsync()) - { - var v = await selector(e.Current, cancellationToken).ConfigureAwait(false); - if (v.HasValue) - { - <#=o.sum#> sum = v.GetValueOrDefault(); - long count = 1; - checked - { - while (await e.MoveNextAsync()) - { - v = await selector(e.Current, cancellationToken).ConfigureAwait(false); - if (v.HasValue) - { - sum += v.GetValueOrDefault(); - ++count; - } - } - } - - return <#=res#>; - } - } - } - - return null; -<# -} -else -{ -#> - await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, false)) - { - if (!await e.MoveNextAsync()) - { - throw Error.NoElements(); - } - - <#=o.sum#> sum = await selector(e.Current, cancellationToken).ConfigureAwait(false); - long count = 1; - checked - { - while (await e.MoveNextAsync()) - { - sum += await selector(e.Current, cancellationToken).ConfigureAwait(false); - ++count; - } - } - - return <#=res#>; - } -<# -} -#> - } - } -#endif - <# } #> diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/IAsyncIListProvider.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/IAsyncIListProvider.cs index ee053df3d..f303daad8 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/IAsyncIListProvider.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/IAsyncIListProvider.cs @@ -19,7 +19,7 @@ namespace System.Linq /// its own version of this interface. We can't replace this with a type forwarder here because that would risk creating a /// circular dependency in cases where an application managed to get out-of-sync versions of the two packages. /// - [Obsolete("Use the definition of this type in the System.Interactive.Async NuGet package System.Linq.Async instead.")] // Can't use a type forwarder because + [Obsolete("This interface was always unsupported, and the IAsyncEnumerable LINQ implementation in System.Linq.AsyncEnumerable does not recognize it, so this no longer serves a purpose")] public interface IAsyncIListProvider : IAsyncEnumerable { /// 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 0081d23b2..7c2581710 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 @@ -95,6 +95,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. @@ -108,6 +109,7 @@ static async ValueTask Core(IAsyncEnumerable source, FuncThe source sequence is empty. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] + [Obsolete("Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -144,6 +146,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -178,7 +181,6 @@ static async ValueTask Core(IAsyncEnumerable source, Func @@ -265,6 +267,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. @@ -278,6 +281,7 @@ static async ValueTask Core(IAsyncEnumerable source, FuncThe source sequence is empty. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] + [Obsolete("Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -314,6 +318,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -348,7 +353,6 @@ static async ValueTask Core(IAsyncEnumerable source, Func @@ -435,6 +439,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. @@ -448,6 +453,7 @@ static async ValueTask Core(IAsyncEnumerable source, FuncThe source sequence is empty. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] + [Obsolete("Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -484,6 +490,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -518,7 +525,6 @@ static async ValueTask Core(IAsyncEnumerable source, Func @@ -605,6 +611,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. @@ -618,6 +625,7 @@ static async ValueTask Core(IAsyncEnumerable source, FuncThe source sequence is empty. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] + [Obsolete("Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -654,6 +662,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -688,7 +697,6 @@ static async ValueTask Core(IAsyncEnumerable source, Func @@ -775,6 +783,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. @@ -788,6 +797,7 @@ static async ValueTask Core(IAsyncEnumerable source, FuncThe source sequence is empty. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] + [Obsolete("Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -824,6 +834,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -858,7 +869,6 @@ static async ValueTask Core(IAsyncEnumerable source, Func @@ -961,6 +971,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. @@ -974,6 +985,7 @@ static async ValueTask Core(IAsyncEnumerable source, FuncThe source sequence is empty. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] + [Obsolete("Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -1018,6 +1030,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -1060,7 +1073,6 @@ static async ValueTask Core(IAsyncEnumerable source, Func @@ -1163,6 +1175,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. @@ -1176,6 +1189,7 @@ static async ValueTask Core(IAsyncEnumerable source, FuncThe source sequence is empty. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] + [Obsolete("Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -1220,6 +1234,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -1262,7 +1277,6 @@ static async ValueTask Core(IAsyncEnumerable source, Func @@ -1365,6 +1379,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. @@ -1378,6 +1393,7 @@ static async ValueTask Core(IAsyncEnumerable source, FuncThe source sequence is empty. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] + [Obsolete("Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -1422,6 +1438,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -1464,7 +1481,6 @@ static async ValueTask Core(IAsyncEnumerable source, Func @@ -1567,6 +1583,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. @@ -1580,6 +1597,7 @@ static async ValueTask Core(IAsyncEnumerable source, FuncThe source sequence is empty. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] + [Obsolete("Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -1624,6 +1642,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -1666,7 +1685,6 @@ static async ValueTask Core(IAsyncEnumerable source, Func @@ -1769,6 +1787,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. @@ -1782,6 +1801,7 @@ static async ValueTask Core(IAsyncEnumerable source, FuncThe source sequence is empty. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] + [Obsolete("Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] private static ValueTask AverageAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -1826,6 +1846,7 @@ static async ValueTask Core(IAsyncEnumerable source, Func AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -1867,7 +1888,6 @@ static async ValueTask Core(IAsyncEnumerable source, Func } } +#endif /// /// Computes the average of an async-enumerable sequence of values that are obtained by invoking an asynchronous transform function on each element of the source sequence and awaiting the result. @@ -228,6 +229,7 @@ else /// The source sequence is empty. /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. [GenerateAsyncOverload] + [Obsolete("Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] private static ValueTask<<#=o.res#>> AverageAwaitAsyncCore(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -304,6 +306,7 @@ else #if !NO_DEEP_CANCELLATION [GenerateAsyncOverload] + [Obsolete("Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] private static ValueTask<<#=o.res#>> AverageAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) { if (source == null) @@ -378,7 +381,6 @@ else } } #endif -#endif <# } 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 9829a4f90..bd9000a0c 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 @@ -82,7 +82,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [GenerateAsyncOverload] + private static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -111,7 +112,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [GenerateAsyncOverload] + private static ValueTask SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -211,7 +213,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [GenerateAsyncOverload] + private static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -240,7 +243,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [GenerateAsyncOverload] + private static ValueTask SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -334,7 +338,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [GenerateAsyncOverload] + private static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -360,7 +365,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [GenerateAsyncOverload] + private static ValueTask SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -451,7 +457,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [GenerateAsyncOverload] + private static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -477,7 +484,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [GenerateAsyncOverload] + private static ValueTask SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -568,7 +576,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [GenerateAsyncOverload] + private static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -594,7 +603,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [GenerateAsyncOverload] + private static ValueTask SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -691,7 +701,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [GenerateAsyncOverload] + private static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -720,7 +731,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [GenerateAsyncOverload] + private static ValueTask SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -820,7 +832,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [GenerateAsyncOverload] + private static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -849,7 +862,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [GenerateAsyncOverload] + private static ValueTask SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -943,7 +957,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [GenerateAsyncOverload] + private static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -969,7 +984,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [GenerateAsyncOverload] + private static ValueTask SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1060,7 +1076,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [GenerateAsyncOverload] + private static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1086,7 +1103,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [GenerateAsyncOverload] + private static ValueTask SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1177,7 +1195,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [GenerateAsyncOverload] + private static ValueTask SumAwaitAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1203,7 +1222,8 @@ static async ValueTask Core(IAsyncEnumerable source, Func SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + [GenerateAsyncOverload] + private 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 c2866e384..a24268e63 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 @@ -138,7 +138,8 @@ else } [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] - internal static ValueTask<<#=o.type#>> SumAwaitAsyncCore(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) + [GenerateAsyncOverload] + private static ValueTask<<#=o.type#>> SumAwaitAsyncCore(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -180,7 +181,8 @@ else #if !NO_DEEP_CANCELLATION [Obsolete("Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] - internal static ValueTask<<#=o.type#>> SumAwaitWithCancellationAsyncCore(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) + [GenerateAsyncOverload] + private static ValueTask<<#=o.type#>> 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/Zip.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Zip.cs index f6f8ca228..6e06fb369 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 @@ -18,11 +18,10 @@ public static partial class AsyncEnumerable /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. - /// The type of the elements in the result sequence, returned by the selector function. /// First async-enumerable source. /// Second async-enumerable source. /// An async-enumerable sequence containing the result of pairwise combining the elements of the first and second source using the specified result selector function. - /// or or is null. + /// or is null. public static IAsyncEnumerable<(TFirst First, TSecond Second)> Zip(this IAsyncEnumerable first, IAsyncEnumerable second) { if (first == null) diff --git a/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemInteractiveAsync.received.cs b/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemInteractiveAsync.received.cs deleted file mode 100644 index 207f025e4..000000000 --- a/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemInteractiveAsync.received.cs +++ /dev/null @@ -1,145 +0,0 @@ -[assembly: System.CLSCompliant(true)] -[assembly: System.Resources.NeutralResourcesLanguage("en-US")] -[assembly: System.Runtime.InteropServices.ComVisible(false)] -[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName=".NET 8.0")] -namespace System.Linq -{ - public static class AsyncEnumerableEx - { - public static System.Collections.Generic.IAsyncEnumerable Amb(params System.Collections.Generic.IAsyncEnumerable[] sources) { } - public static System.Collections.Generic.IAsyncEnumerable Amb(this System.Collections.Generic.IEnumerable> sources) { } - public static System.Collections.Generic.IAsyncEnumerable Amb(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second) { } - public static System.Collections.Generic.IAsyncEnumerable AsAsyncEnumerable(this System.Collections.Generic.IAsyncEnumerable source) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Collections.Generic.IAsyncEnumerable> Buffer(this System.Collections.Generic.IAsyncEnumerable source, int count) { } - public static System.Collections.Generic.IAsyncEnumerable> Buffer(this System.Collections.Generic.IAsyncEnumerable source, int count, int skip) { } - public static System.Collections.Generic.IAsyncEnumerable Catch(params System.Collections.Generic.IAsyncEnumerable[] sources) { } - public static System.Collections.Generic.IAsyncEnumerable Catch(this System.Collections.Generic.IEnumerable> sources) { } - public static System.Collections.Generic.IAsyncEnumerable Catch(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second) { } - public static System.Collections.Generic.IAsyncEnumerable Catch(this System.Collections.Generic.IAsyncEnumerable source, System.Func> handler) - where TException : System.Exception { } - public static System.Collections.Generic.IAsyncEnumerable Catch(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> handler) - where TException : System.Exception { } - public static System.Collections.Generic.IAsyncEnumerable Catch(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> handler) - where TException : System.Exception { } - public static System.Collections.Generic.IAsyncEnumerable Concat(params System.Collections.Generic.IAsyncEnumerable[] sources) { } - public static System.Collections.Generic.IAsyncEnumerable Concat(this System.Collections.Generic.IAsyncEnumerable> sources) { } - public static System.Collections.Generic.IAsyncEnumerable Concat(this System.Collections.Generic.IEnumerable> sources) { } - public static System.Collections.Generic.IAsyncEnumerable Defer(System.Func> factory) { } - public static System.Collections.Generic.IAsyncEnumerable Defer(System.Func>> factory) { } - public static System.Collections.Generic.IAsyncEnumerable Defer(System.Func>> factory) { } - public static System.Collections.Generic.IAsyncEnumerable Distinct(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector) { } - public static System.Collections.Generic.IAsyncEnumerable Distinct(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector) { } - public static System.Collections.Generic.IAsyncEnumerable Distinct(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector) { } - public static System.Collections.Generic.IAsyncEnumerable Distinct(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Collections.Generic.IAsyncEnumerable Distinct(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Collections.Generic.IAsyncEnumerable Distinct(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Collections.Generic.IAsyncEnumerable DistinctUntilChanged(this System.Collections.Generic.IAsyncEnumerable source) { } - public static System.Collections.Generic.IAsyncEnumerable DistinctUntilChanged(this System.Collections.Generic.IAsyncEnumerable source, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Collections.Generic.IAsyncEnumerable DistinctUntilChanged(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector) { } - public static System.Collections.Generic.IAsyncEnumerable DistinctUntilChanged(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector) { } - public static System.Collections.Generic.IAsyncEnumerable DistinctUntilChanged(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector) { } - public static System.Collections.Generic.IAsyncEnumerable DistinctUntilChanged(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Collections.Generic.IAsyncEnumerable DistinctUntilChanged(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Collections.Generic.IAsyncEnumerable DistinctUntilChanged(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IEqualityComparer comparer) { } - public static System.Collections.Generic.IAsyncEnumerable Do(this System.Collections.Generic.IAsyncEnumerable source, System.Action onNext) { } - public static System.Collections.Generic.IAsyncEnumerable Do(this System.Collections.Generic.IAsyncEnumerable source, System.Func onNext) { } - public static System.Collections.Generic.IAsyncEnumerable Do(this System.Collections.Generic.IAsyncEnumerable source, System.Func onNext) { } - public static System.Collections.Generic.IAsyncEnumerable Do(this System.Collections.Generic.IAsyncEnumerable source, System.IObserver observer) { } - public static System.Collections.Generic.IAsyncEnumerable Do(this System.Collections.Generic.IAsyncEnumerable source, System.Action onNext, System.Action onCompleted) { } - public static System.Collections.Generic.IAsyncEnumerable Do(this System.Collections.Generic.IAsyncEnumerable source, System.Action onNext, System.Action onError) { } - public static System.Collections.Generic.IAsyncEnumerable Do(this System.Collections.Generic.IAsyncEnumerable source, System.Func onNext, System.Func onCompleted) { } - public static System.Collections.Generic.IAsyncEnumerable Do(this System.Collections.Generic.IAsyncEnumerable source, System.Func onNext, System.Func onError) { } - public static System.Collections.Generic.IAsyncEnumerable Do(this System.Collections.Generic.IAsyncEnumerable source, System.Func onNext, System.Func onCompleted) { } - public static System.Collections.Generic.IAsyncEnumerable Do(this System.Collections.Generic.IAsyncEnumerable source, System.Func onNext, System.Func onError) { } - public static System.Collections.Generic.IAsyncEnumerable Do(this System.Collections.Generic.IAsyncEnumerable source, System.Action onNext, System.Action onError, System.Action onCompleted) { } - public static System.Collections.Generic.IAsyncEnumerable Do(this System.Collections.Generic.IAsyncEnumerable source, System.Func onNext, System.Func onError, System.Func onCompleted) { } - public static System.Collections.Generic.IAsyncEnumerable Do(this System.Collections.Generic.IAsyncEnumerable source, System.Func onNext, System.Func onError, System.Func onCompleted) { } - public static System.Collections.Generic.IAsyncEnumerable Expand(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector) { } - public static System.Collections.Generic.IAsyncEnumerable Expand(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> selector) { } - public static System.Collections.Generic.IAsyncEnumerable Expand(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> selector) { } - public static System.Collections.Generic.IAsyncEnumerable Finally(this System.Collections.Generic.IAsyncEnumerable source, System.Action finallyAction) { } - public static System.Collections.Generic.IAsyncEnumerable Finally(this System.Collections.Generic.IAsyncEnumerable source, System.Func finallyAction) { } - public static System.Collections.Generic.IAsyncEnumerable Generate(TState initialState, System.Func condition, System.Func iterate, System.Func resultSelector) { } - public static System.Collections.Generic.IAsyncEnumerable IgnoreElements(this System.Collections.Generic.IAsyncEnumerable source) { } - public static System.Threading.Tasks.ValueTask IsEmptyAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> MaxByAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> MaxByAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> MaxByAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> MaxByAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> MaxByAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> MaxByAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Collections.Generic.IAsyncEnumerable Merge(params System.Collections.Generic.IAsyncEnumerable[] sources) { } - public static System.Collections.Generic.IAsyncEnumerable Merge(this System.Collections.Generic.IAsyncEnumerable> sources) { } - public static System.Collections.Generic.IAsyncEnumerable Merge(this System.Collections.Generic.IEnumerable> sources) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> MinByAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> MinByAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> MinByAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> MinByAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> MinByAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> MinByAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Collections.Generic.IAsyncEnumerable Never() { } - public static System.Collections.Generic.IAsyncEnumerable OnErrorResumeNext(params System.Collections.Generic.IAsyncEnumerable[] sources) { } - public static System.Collections.Generic.IAsyncEnumerable OnErrorResumeNext(this System.Collections.Generic.IEnumerable> sources) { } - public static System.Collections.Generic.IAsyncEnumerable OnErrorResumeNext(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second) { } - public static System.Collections.Generic.IAsyncEnumerable Repeat(TResult element) { } - public static System.Collections.Generic.IAsyncEnumerable Repeat(this System.Collections.Generic.IAsyncEnumerable source) { } - public static System.Collections.Generic.IAsyncEnumerable Repeat(this System.Collections.Generic.IAsyncEnumerable source, int count) { } - public static System.Collections.Generic.IAsyncEnumerable Retry(this System.Collections.Generic.IAsyncEnumerable source) { } - public static System.Collections.Generic.IAsyncEnumerable Retry(this System.Collections.Generic.IAsyncEnumerable source, int retryCount) { } - public static System.Collections.Generic.IAsyncEnumerable Return(TValue value) { } - public static System.Collections.Generic.IAsyncEnumerable Scan(this System.Collections.Generic.IAsyncEnumerable source, System.Func> accumulator) { } - public static System.Collections.Generic.IAsyncEnumerable Scan(this System.Collections.Generic.IAsyncEnumerable source, System.Func accumulator) { } - public static System.Collections.Generic.IAsyncEnumerable Scan(this System.Collections.Generic.IAsyncEnumerable source, System.Func> accumulator) { } - public static System.Collections.Generic.IAsyncEnumerable Scan(this System.Collections.Generic.IAsyncEnumerable source, TAccumulate seed, System.Func> accumulator) { } - public static System.Collections.Generic.IAsyncEnumerable Scan(this System.Collections.Generic.IAsyncEnumerable source, TAccumulate seed, System.Func accumulator) { } - public static System.Collections.Generic.IAsyncEnumerable Scan(this System.Collections.Generic.IAsyncEnumerable source, TAccumulate seed, System.Func> accumulator) { } - public static System.Collections.Generic.IAsyncEnumerable SelectMany(this System.Collections.Generic.IAsyncEnumerable source, System.Collections.Generic.IAsyncEnumerable other) { } - public static System.Collections.Generic.IAsyncEnumerable StartWith(this System.Collections.Generic.IAsyncEnumerable source, params TSource[] values) { } - public static System.Collections.Generic.IAsyncEnumerable Throw(System.Exception exception) { } - public static System.Collections.Generic.IAsyncEnumerable Timeout(this System.Collections.Generic.IAsyncEnumerable source, System.TimeSpan timeout) { } - public static System.Collections.Generic.IAsyncEnumerable Using(System.Func> resourceFactory, System.Func>> enumerableFactory) - where TResource : System.IDisposable { } - public static System.Collections.Generic.IAsyncEnumerable Using(System.Func resourceFactory, System.Func> enumerableFactory) - where TResource : System.IDisposable { } - public static System.Collections.Generic.IAsyncEnumerable Using(System.Func> resourceFactory, System.Func>> enumerableFactory) - where TResource : System.IDisposable { } - } - public interface IAsyncIListProvider : System.Collections.Generic.IAsyncEnumerable - { - System.Threading.Tasks.ValueTask GetCountAsync(bool onlyIfCheap, System.Threading.CancellationToken cancellationToken); - System.Threading.Tasks.ValueTask ToArrayAsync(System.Threading.CancellationToken cancellationToken); - System.Threading.Tasks.ValueTask> ToListAsync(System.Threading.CancellationToken cancellationToken); - } -} \ No newline at end of file diff --git a/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemInteractiveAsync.verified.cs b/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemInteractiveAsync.verified.cs index 067c12170..a186ec767 100644 --- a/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemInteractiveAsync.verified.cs +++ b/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemInteractiveAsync.verified.cs @@ -1,7 +1,7 @@ [assembly: System.CLSCompliant(true)] [assembly: System.Resources.NeutralResourcesLanguage("en-US")] [assembly: System.Runtime.InteropServices.ComVisible(false)] -[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName=".NET 6.0")] +[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName=".NET 8.0")] namespace System.Linq { public static class AsyncEnumerableEx @@ -9,6 +9,17 @@ public static class AsyncEnumerableEx public static System.Collections.Generic.IAsyncEnumerable Amb(params System.Collections.Generic.IAsyncEnumerable[] sources) { } public static System.Collections.Generic.IAsyncEnumerable Amb(this System.Collections.Generic.IEnumerable> sources) { } public static System.Collections.Generic.IAsyncEnumerable Amb(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second) { } + public static System.Collections.Generic.IAsyncEnumerable AsAsyncEnumerable(this System.Collections.Generic.IAsyncEnumerable source) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } public static System.Collections.Generic.IAsyncEnumerable> Buffer(this System.Collections.Generic.IAsyncEnumerable source, int count) { } public static System.Collections.Generic.IAsyncEnumerable> Buffer(this System.Collections.Generic.IAsyncEnumerable source, int count, int skip) { } public static System.Collections.Generic.IAsyncEnumerable Catch(params System.Collections.Generic.IAsyncEnumerable[] sources) { } @@ -98,6 +109,9 @@ public static System.Collections.Generic.IAsyncEnumerable SelectMany StartWith(this System.Collections.Generic.IAsyncEnumerable source, params TSource[] values) { } public static System.Collections.Generic.IAsyncEnumerable Throw(System.Exception exception) { } public static System.Collections.Generic.IAsyncEnumerable Timeout(this System.Collections.Generic.IAsyncEnumerable source, System.TimeSpan timeout) { } + public static System.Collections.Generic.IAsyncEnumerable ToAsyncEnumerable(this System.IObservable source) { } + public static System.Collections.Generic.IAsyncEnumerable ToAsyncEnumerable(this System.Threading.Tasks.Task task) { } + public static System.IObservable ToObservable(this System.Collections.Generic.IAsyncEnumerable source) { } public static System.Collections.Generic.IAsyncEnumerable Using(System.Func> resourceFactory, System.Func>> enumerableFactory) where TResource : System.IDisposable { } public static System.Collections.Generic.IAsyncEnumerable Using(System.Func resourceFactory, System.Func> enumerableFactory) diff --git a/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemInteractiveAsyncProviders.received.cs b/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemInteractiveAsyncProviders.received.cs deleted file mode 100644 index 55fa24db5..000000000 --- a/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemInteractiveAsyncProviders.received.cs +++ /dev/null @@ -1,82 +0,0 @@ -[assembly: System.CLSCompliant(true)] -[assembly: System.Resources.NeutralResourcesLanguage("en-US")] -[assembly: System.Runtime.InteropServices.ComVisible(false)] -[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName=".NET 8.0")] -namespace System.Linq -{ - [System.Linq.LocalQueryMethodImplementationType(typeof(System.Linq.AsyncEnumerableEx))] - public static class AsyncQueryableEx - { - public static System.Linq.IAsyncQueryable Amb(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second) { } - public static System.Linq.IAsyncQueryable> Buffer(this System.Linq.IAsyncQueryable source, int count) { } - public static System.Linq.IAsyncQueryable> Buffer(this System.Linq.IAsyncQueryable source, int count, int skip) { } - public static System.Linq.IAsyncQueryable Catch(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second) { } - public static System.Linq.IAsyncQueryable Catch(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> handler) { } - public static System.Linq.IAsyncQueryable Catch(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>>> handler) { } - public static System.Linq.IAsyncQueryable Catch(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>>> handler) { } - public static System.Linq.IAsyncQueryable Concat(this System.Linq.IAsyncQueryable> sources) { } - public static System.Linq.IAsyncQueryable Distinct(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector) { } - public static System.Linq.IAsyncQueryable Distinct(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector) { } - public static System.Linq.IAsyncQueryable Distinct(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector) { } - public static System.Linq.IAsyncQueryable Distinct(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Linq.IAsyncQueryable Distinct(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Linq.IAsyncQueryable Distinct(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Linq.IAsyncQueryable DistinctUntilChanged(this System.Linq.IAsyncQueryable source) { } - public static System.Linq.IAsyncQueryable DistinctUntilChanged(this System.Linq.IAsyncQueryable source, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Linq.IAsyncQueryable DistinctUntilChanged(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector) { } - public static System.Linq.IAsyncQueryable DistinctUntilChanged(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector) { } - public static System.Linq.IAsyncQueryable DistinctUntilChanged(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector) { } - public static System.Linq.IAsyncQueryable DistinctUntilChanged(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Linq.IAsyncQueryable DistinctUntilChanged(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Linq.IAsyncQueryable DistinctUntilChanged(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Linq.IAsyncQueryable Do(this System.Linq.IAsyncQueryable source, System.IObserver observer) { } - public static System.Linq.IAsyncQueryable Do(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> onNext) { } - public static System.Linq.IAsyncQueryable Do(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> onNext) { } - public static System.Linq.IAsyncQueryable Do(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> onNext) { } - public static System.Linq.IAsyncQueryable Do(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> onNext, System.Action onCompleted) { } - public static System.Linq.IAsyncQueryable Do(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> onNext, System.Linq.Expressions.Expression> onError) { } - public static System.Linq.IAsyncQueryable Do(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> onNext, System.Linq.Expressions.Expression> onCompleted) { } - public static System.Linq.IAsyncQueryable Do(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> onNext, System.Linq.Expressions.Expression> onError) { } - public static System.Linq.IAsyncQueryable Do(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> onNext, System.Linq.Expressions.Expression> onCompleted) { } - public static System.Linq.IAsyncQueryable Do(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> onNext, System.Linq.Expressions.Expression> onError) { } - public static System.Linq.IAsyncQueryable Do(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> onNext, System.Linq.Expressions.Expression> onError, System.Action onCompleted) { } - public static System.Linq.IAsyncQueryable Do(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> onNext, System.Linq.Expressions.Expression> onError, System.Linq.Expressions.Expression> onCompleted) { } - public static System.Linq.IAsyncQueryable Do(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> onNext, System.Linq.Expressions.Expression> onError, System.Linq.Expressions.Expression> onCompleted) { } - public static System.Linq.IAsyncQueryable Expand(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector) { } - public static System.Linq.IAsyncQueryable Expand(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>>> selector) { } - public static System.Linq.IAsyncQueryable Expand(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>>> selector) { } - public static System.Linq.IAsyncQueryable Finally(this System.Linq.IAsyncQueryable source, System.Action finallyAction) { } - public static System.Linq.IAsyncQueryable Finally(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> finallyAction) { } - public static System.Linq.IAsyncQueryable IgnoreElements(this System.Linq.IAsyncQueryable source) { } - public static System.Threading.Tasks.ValueTask IsEmptyAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> MaxByAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> MaxByAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> MaxByAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> MaxByAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> MaxByAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> MaxByAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Linq.IAsyncQueryable Merge(this System.Linq.IAsyncQueryable> sources) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> MinByAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> MinByAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> MinByAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> MinByAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> MinByAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> MinByAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Linq.IAsyncQueryable OnErrorResumeNext(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second) { } - public static System.Linq.IAsyncQueryable Repeat(this System.Linq.IAsyncQueryable source) { } - public static System.Linq.IAsyncQueryable Repeat(this System.Linq.IAsyncQueryable source, int count) { } - public static System.Linq.IAsyncQueryable Retry(this System.Linq.IAsyncQueryable source) { } - public static System.Linq.IAsyncQueryable Retry(this System.Linq.IAsyncQueryable source, int retryCount) { } - public static System.Linq.IAsyncQueryable Scan(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> accumulator) { } - public static System.Linq.IAsyncQueryable Scan(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> accumulator) { } - public static System.Linq.IAsyncQueryable Scan(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> accumulator) { } - public static System.Linq.IAsyncQueryable Scan(this System.Linq.IAsyncQueryable source, TAccumulate seed, System.Linq.Expressions.Expression>> accumulator) { } - public static System.Linq.IAsyncQueryable Scan(this System.Linq.IAsyncQueryable source, TAccumulate seed, System.Linq.Expressions.Expression> accumulator) { } - public static System.Linq.IAsyncQueryable Scan(this System.Linq.IAsyncQueryable source, TAccumulate seed, System.Linq.Expressions.Expression>> accumulator) { } - public static System.Linq.IAsyncQueryable SelectMany(this System.Linq.IAsyncQueryable source, System.Collections.Generic.IAsyncEnumerable other) { } - public static System.Linq.IAsyncQueryable StartWith(this System.Linq.IAsyncQueryable source, params TSource[] values) { } - public static System.Linq.IAsyncQueryable Timeout(this System.Linq.IAsyncQueryable source, System.TimeSpan timeout) { } - } -} \ No newline at end of file diff --git a/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemInteractiveAsyncProviders.verified.cs b/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemInteractiveAsyncProviders.verified.cs index a51d1bc7c..55fa24db5 100644 --- a/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemInteractiveAsyncProviders.verified.cs +++ b/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemInteractiveAsyncProviders.verified.cs @@ -1,7 +1,7 @@ [assembly: System.CLSCompliant(true)] [assembly: System.Resources.NeutralResourcesLanguage("en-US")] [assembly: System.Runtime.InteropServices.ComVisible(false)] -[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName=".NET 6.0")] +[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName=".NET 8.0")] namespace System.Linq { [System.Linq.LocalQueryMethodImplementationType(typeof(System.Linq.AsyncEnumerableEx))] diff --git a/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemLinqAsync.received.cs b/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemLinqAsync.received.cs deleted file mode 100644 index e19c26338..000000000 --- a/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemLinqAsync.received.cs +++ /dev/null @@ -1,703 +0,0 @@ -[assembly: System.CLSCompliant(true)] -[assembly: System.Resources.NeutralResourcesLanguage("en-US")] -[assembly: System.Runtime.InteropServices.ComVisible(false)] -[assembly: System.Runtime.Versioning.TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName=".NET Standard 2.1")] -namespace System.Collections.Generic -{ - public static class AsyncEnumerator - { - public static System.Collections.Generic.IAsyncEnumerator Create(System.Func> moveNextAsync, System.Func getCurrent, System.Func disposeAsync) { } - public static System.Threading.Tasks.ValueTask MoveNextAsync(this System.Collections.Generic.IAsyncEnumerator source, System.Threading.CancellationToken cancellationToken) { } - public static System.Collections.Generic.IAsyncEnumerator WithCancellation(this System.Collections.Generic.IAsyncEnumerator source, System.Threading.CancellationToken cancellationToken) { } - } -} -namespace System.Linq -{ - public static class AsyncEnumerable - { - public static System.Threading.Tasks.ValueTask AggregateAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func accumulator, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AggregateAsync(this System.Collections.Generic.IAsyncEnumerable source, TAccumulate seed, System.Func accumulator, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AggregateAsync(this System.Collections.Generic.IAsyncEnumerable source, TAccumulate seed, System.Func accumulator, System.Func resultSelector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use AggregateAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, " + - "and the AggregateAwaitAsync now exists as overloads of AggregateAsync.")] - public static System.Threading.Tasks.ValueTask AggregateAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> accumulator, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use AggregateAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, " + - "and the AggregateAwaitAsync functionality now exists as overloads of AggregateAs" + - "ync.")] - public static System.Threading.Tasks.ValueTask AggregateAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, TAccumulate seed, System.Func> accumulator, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use AggregateAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, " + - "and the AggregateAwaitAsync functionality now exists as overloads of AggregateAs" + - "ync.")] - public static System.Threading.Tasks.ValueTask AggregateAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, TAccumulate seed, System.Func> accumulator, System.Func> resultSelector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use AggregateAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, " + - "and the AggregateAwaitWithCancellationAsync functionality now exists as overload" + - "s of AggregateAsync.")] - public static System.Threading.Tasks.ValueTask AggregateAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> accumulator, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use AggregateAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, " + - "and the AggregateAwaitWithCancellationAsync functionality now exists as overload" + - "s of AggregateAsync.")] - public static System.Threading.Tasks.ValueTask AggregateAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, TAccumulate seed, System.Func> accumulator, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use AggregateAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, " + - "and the AggregateAwaitWithCancellationAsync functionality now exists as overload" + - "s of AggregateAsync.")] - public static System.Threading.Tasks.ValueTask AggregateAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, TAccumulate seed, System.Func> accumulator, System.Func> resultSelector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AllAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use AllAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and th" + - "e AllAwaitAsync functionality now exists as overloads of All.")] - public static System.Threading.Tasks.ValueTask AllAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use AllAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and th" + - "e AllAwaitWithCancellationAsync functionality now exists as overloads of AllAsyn" + - "c.")] - public static System.Threading.Tasks.ValueTask AllAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AnyAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AnyAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use AnyAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and th" + - "e AnyAwaitAsync functionality now exists as overloads of AnyAsync.")] - public static System.Threading.Tasks.ValueTask AnyAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use AnyAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and th" + - "e AnyAwaitWithCancellationAsync functionality now exists as overloads of AnyAsyn" + - "c.")] - public static System.Threading.Tasks.ValueTask AnyAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Collections.Generic.IAsyncEnumerable Append(this System.Collections.Generic.IAsyncEnumerable source, TSource element) { } - public static System.Collections.Generic.IAsyncEnumerable AsAsyncEnumerable(this System.Collections.Generic.IAsyncEnumerable source) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Collections.Generic.IAsyncEnumerable Cast(this System.Collections.Generic.IAsyncEnumerable source) { } - public static System.Collections.Generic.IAsyncEnumerable Concat(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second) { } - public static System.Threading.Tasks.ValueTask ContainsAsync(this System.Collections.Generic.IAsyncEnumerable source, TSource value, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask ContainsAsync(this System.Collections.Generic.IAsyncEnumerable source, TSource value, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask CountAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask CountAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use CountAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the CountAwaitAsync functionality now exists as overloads of CountAsync.")] - public static System.Threading.Tasks.ValueTask CountAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use CountAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the CountAwaitWithCancellationAsync functionality now exists as overloads of Cou" + - "ntAsync.")] - public static System.Threading.Tasks.ValueTask CountAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Collections.Generic.IAsyncEnumerable Create(System.Func> getAsyncEnumerator) { } - public static System.Collections.Generic.IAsyncEnumerable DefaultIfEmpty(this System.Collections.Generic.IAsyncEnumerable source) { } - public static System.Collections.Generic.IAsyncEnumerable DefaultIfEmpty(this System.Collections.Generic.IAsyncEnumerable source, TSource defaultValue) { } - public static System.Collections.Generic.IAsyncEnumerable Distinct(this System.Collections.Generic.IAsyncEnumerable source) { } - public static System.Collections.Generic.IAsyncEnumerable Distinct(this System.Collections.Generic.IAsyncEnumerable source, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Threading.Tasks.ValueTask ElementAtAsync(this System.Collections.Generic.IAsyncEnumerable source, int index, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask ElementAtOrDefaultAsync(this System.Collections.Generic.IAsyncEnumerable source, int index, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Collections.Generic.IAsyncEnumerable Empty() { } - public static System.Collections.Generic.IAsyncEnumerable Except(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second) { } - public static System.Collections.Generic.IAsyncEnumerable Except(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Threading.Tasks.ValueTask FirstAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask FirstAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use FirstAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the FirstAwaitAsync functionality now exists as overloads of FirstAsync.")] - public static System.Threading.Tasks.ValueTask FirstAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use FirstAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the FirstAwaitWithCancellationAsync functionality now exists as overloads of Fir" + - "stAsync.")] - public static System.Threading.Tasks.ValueTask FirstAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask FirstOrDefaultAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask FirstOrDefaultAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use FirstOrDefaultAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumera" + - "ble, and the FirstOrDefaultAwaitAsync functionality now exists as overloads of F" + - "irstOrDefaultAsync.")] - public static System.Threading.Tasks.ValueTask FirstOrDefaultAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use FirstOrDefaultAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumera" + - "ble, and the FirstOrDefaultAwaitWithCancellationAsync functionality now exists a" + - "s overloads of FirstOrDefaultAsync.")] - public static System.Threading.Tasks.ValueTask FirstOrDefaultAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use the language support for async foreach instead.")] - public static System.Threading.Tasks.Task ForEachAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Action action, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use the language support for async foreach instead.")] - public static System.Threading.Tasks.Task ForEachAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Action action, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use the language support for async foreach instead.")] - public static System.Threading.Tasks.Task ForEachAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func action, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use the language support for async foreach instead.")] - public static System.Threading.Tasks.Task ForEachAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func action, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use the language support for async foreach instead.")] - public static System.Threading.Tasks.Task ForEachAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func action, System.Threading.CancellationToken cancellationToken) { } - [System.Obsolete("Use the language support for async foreach instead.")] - public static System.Threading.Tasks.Task ForEachAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func action, System.Threading.CancellationToken cancellationToken) { } - public static System.Collections.Generic.IAsyncEnumerable> GroupBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector) { } - public static System.Collections.Generic.IAsyncEnumerable> GroupBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Collections.Generic.IAsyncEnumerable> GroupBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Func elementSelector) { } - public static System.Collections.Generic.IAsyncEnumerable GroupBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Func, TResult> resultSelector) { } - public static System.Collections.Generic.IAsyncEnumerable> GroupBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Collections.Generic.IAsyncEnumerable GroupBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Func, TResult> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Collections.Generic.IAsyncEnumerable GroupBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Func elementSelector, System.Func, TResult> resultSelector) { } - public static System.Collections.Generic.IAsyncEnumerable GroupBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Func elementSelector, System.Func, TResult> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + - " GroupByAwait functionality now exists as overloads of GroupBy.")] - public static System.Collections.Generic.IAsyncEnumerable> GroupByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector) { } - [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + - " GroupByAwait functionality now exists as overloads of GroupBy.")] - public static System.Collections.Generic.IAsyncEnumerable> GroupByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } - [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + - " GroupByAwait functionality now exists as overloads of GroupBy.")] - public static System.Collections.Generic.IAsyncEnumerable> GroupByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector) { } - [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + - " GroupByAwait functionality now exists as overloads of GroupBy.")] - public static System.Collections.Generic.IAsyncEnumerable GroupByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func, System.Threading.Tasks.ValueTask> resultSelector) { } - [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + - " GroupByAwait functionality now exists as overloads of GroupBy.")] - public static System.Collections.Generic.IAsyncEnumerable> GroupByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + - " GroupByAwait functionality now exists as overloads of GroupBy.")] - public static System.Collections.Generic.IAsyncEnumerable GroupByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func, System.Threading.Tasks.ValueTask> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + - " GroupByAwait functionality now exists as overloads of GroupBy.")] - public static System.Collections.Generic.IAsyncEnumerable GroupByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Func, System.Threading.Tasks.ValueTask> resultSelector) { } - [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + - " GroupByAwait functionality now exists as overloads of GroupBy.")] - public static System.Collections.Generic.IAsyncEnumerable GroupByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Func, System.Threading.Tasks.ValueTask> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + - " GroupByAwaitWithCancellationAsync functionality now exists as overloads of Grou" + - "pBy.")] - public static System.Collections.Generic.IAsyncEnumerable> GroupByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector) { } - [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + - " GroupByAwaitWithCancellationAsync functionality now exists as overloads of Grou" + - "pBy.")] - public static System.Collections.Generic.IAsyncEnumerable> GroupByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } - [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + - " GroupByAwaitWithCancellationAsync functionality now exists as overloads of Grou" + - "pBy.")] - public static System.Collections.Generic.IAsyncEnumerable> GroupByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector) { } - [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + - " GroupByAwaitWithCancellationAsync functionality now exists as overloads of Grou" + - "pBy.")] - public static System.Collections.Generic.IAsyncEnumerable GroupByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask> resultSelector) { } - [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + - " GroupByAwaitWithCancellationAsync functionality now exists as overloads of Grou" + - "pBy.")] - public static System.Collections.Generic.IAsyncEnumerable> GroupByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + - " GroupByAwaitWithCancellationAsync functionality now exists as overloads of Grou" + - "pBy.")] - public static System.Collections.Generic.IAsyncEnumerable GroupByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + - " GroupByAwaitWithCancellationAsync functionality now exists as overloads of Grou" + - "pBy.")] - public static System.Collections.Generic.IAsyncEnumerable GroupByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Func, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask> resultSelector) { } - [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + - " GroupByAwaitWithCancellationAsync functionality now exists as overloads of Grou" + - "pBy.")] - public static System.Collections.Generic.IAsyncEnumerable GroupByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Func, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Collections.Generic.IAsyncEnumerable GroupJoin(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func outerKeySelector, System.Func innerKeySelector, System.Func, TResult> resultSelector) { } - public static System.Collections.Generic.IAsyncEnumerable GroupJoin(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func outerKeySelector, System.Func innerKeySelector, System.Func, TResult> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - [System.Obsolete("Use GroupJoin. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and t" + - "he GroupJoinAwait functionality now exists as overloads of GroupJoin.")] - public static System.Collections.Generic.IAsyncEnumerable GroupJoinAwait(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func> outerKeySelector, System.Func> innerKeySelector, System.Func, System.Threading.Tasks.ValueTask> resultSelector) { } - [System.Obsolete("Use GroupJoin. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and t" + - "he GroupJoinAwait functionality now exists as overloads of GroupJoin.")] - public static System.Collections.Generic.IAsyncEnumerable GroupJoinAwait(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func> outerKeySelector, System.Func> innerKeySelector, System.Func, System.Threading.Tasks.ValueTask> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - [System.Obsolete("Use GroupJoin. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and t" + - "he GroupJoinAwaitWithCancellation functionality now exists as overloads of Group" + - "Join.")] - public static System.Collections.Generic.IAsyncEnumerable GroupJoinAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func> outerKeySelector, System.Func> innerKeySelector, System.Func, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask> resultSelector) { } - [System.Obsolete("Use GroupJoin. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and t" + - "he GroupJoinAwaitWithCancellation functionality now exists as overloads of Group" + - "Join.")] - public static System.Collections.Generic.IAsyncEnumerable GroupJoinAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func> outerKeySelector, System.Func> innerKeySelector, System.Func, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Collections.Generic.IAsyncEnumerable Intersect(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second) { } - public static System.Collections.Generic.IAsyncEnumerable Intersect(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Collections.Generic.IAsyncEnumerable Join(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func outerKeySelector, System.Func innerKeySelector, System.Func resultSelector) { } - public static System.Collections.Generic.IAsyncEnumerable Join(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func outerKeySelector, System.Func innerKeySelector, System.Func resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - [System.Obsolete("Use Join. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the Jo" + - "inAwait functionality now exists as overloads of Join.")] - public static System.Collections.Generic.IAsyncEnumerable JoinAwait(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func> outerKeySelector, System.Func> innerKeySelector, System.Func> resultSelector) { } - [System.Obsolete("Use Join. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the Jo" + - "inAwait functionality now exists as overloads of Join.")] - public static System.Collections.Generic.IAsyncEnumerable JoinAwait(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func> outerKeySelector, System.Func> innerKeySelector, System.Func> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - [System.Obsolete("Use Join. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the Jo" + - "inAwaitWithCancellation functionality now exists as overloads of Join.")] - public static System.Collections.Generic.IAsyncEnumerable JoinAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func> outerKeySelector, System.Func> innerKeySelector, System.Func> resultSelector) { } - [System.Obsolete("Use Join. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the Jo" + - "inAwaitWithCancellation functionality now exists as overloads of Join.")] - public static System.Collections.Generic.IAsyncEnumerable JoinAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func> outerKeySelector, System.Func> innerKeySelector, System.Func> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Threading.Tasks.ValueTask LastAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask LastAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use LastAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and t" + - "he LastAwaitAsync functionality now exists as overloads of LastAsync.")] - public static System.Threading.Tasks.ValueTask LastAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use LastAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and t" + - "he LastAwaitWithCancellationAsync functionality now exists as overloads of LastA" + - "sync.")] - public static System.Threading.Tasks.ValueTask LastAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask LastOrDefaultAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask LastOrDefaultAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use LastOrDefaultAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerab" + - "le, and the LastOrDefaultAwaitAsync functionality now exists as overloads of Las" + - "tOrDefaultAsync.")] - public static System.Threading.Tasks.ValueTask LastOrDefaultAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use LastOrDefaultAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerab" + - "le, and the LastOrDefaultAwaitWithCancellationAsync functionality now exists as " + - "overloads of LastOrDefaultAsync.")] - public static System.Threading.Tasks.ValueTask LastOrDefaultAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask LongCountAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask LongCountAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use LongCountAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, " + - "and the LongCountAwaitAsync functionality now exists as overloads of LongCountAs" + - "ync.")] - public static System.Threading.Tasks.ValueTask LongCountAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use LongCountAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, " + - "and the LongCountAwaitWithCancellationAsync functionality now exists as overload" + - "s of LongCountAsync.")] - public static System.Threading.Tasks.ValueTask LongCountAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by the MaxAsync overload that took a selec" + - "tor callback now exists as an overload of MaxByAsync.")] - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MaxAwaitAsync now exists as an overload" + - " of MaxByAsync.")] - public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MaxAwaitAsync now exists as an overload" + - " of MaxByAsync.")] - public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MaxAwaitAsync now exists as an overload" + - " of MaxByAsync.")] - public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MaxAwaitAsync now exists as an overload" + - " of MaxByAsync.")] - public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MaxAwaitAsync now exists as an overload" + - " of MaxByAsync.")] - public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MaxAwaitAsync now exists as an overload" + - " of MaxByAsync.")] - public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MaxAwaitAsync now exists as an overload" + - " of MaxByAsync.")] - public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MaxAwaitAsync now exists as an overload" + - " of MaxByAsync.")] - public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MaxAwaitAsync now exists as an overload" + - " of MaxByAsync.")] - public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MaxAwaitAsync now exists as an overload" + - " of MaxByAsync.")] - public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MaxAwaitAsync now exists as an overload" + - " of MaxByAsync.")] - public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + - "s as an overload of MaxByAsync.")] - public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + - "s as an overload of MaxByAsync.")] - public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + - "s as an overload of MaxByAsync.")] - public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + - "s as an overload of MaxByAsync.")] - public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + - "s as an overload of MaxByAsync.")] - public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + - "s as an overload of MaxByAsync.")] - public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + - "s as an overload of MaxByAsync.")] - public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + - "s as an overload of MaxByAsync.")] - public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + - "s as an overload of MaxByAsync.")] - public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + - "s as an overload of MaxByAsync.")] - public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + - "s as an overload of MaxByAsync.")] - public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by the MinAsync overload that took a selec" + - "tor callback now exists as an overload of MinByAsync.")] - public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MinAwaitAsync now exists as an overload" + - " of MinByAsync.")] - public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MinAwaitAsync now exists as an overload" + - " of MinByAsync.")] - public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MinAwaitAsync now exists as an overload" + - " of MinByAsync.")] - public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MinAwaitAsync now exists as an overload" + - " of MinByAsync.")] - public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MinAwaitAsync now exists as an overload" + - " of MinByAsync.")] - public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MinAwaitAsync now exists as an overload" + - " of MinByAsync.")] - public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MinAwaitAsync now exists as an overload" + - " of MinByAsync.")] - public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MinAwaitAsync now exists as an overload" + - " of MinByAsync.")] - public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MinAwaitAsync now exists as an overload" + - " of MinByAsync.")] - public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MinAwaitAsync now exists as an overload" + - " of MinByAsync.")] - public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MinAwaitAsync now exists as an overload" + - " of MinByAsync.")] - public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + - "s as an overload of MinByAsync.")] - public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + - "s as an overload of MinByAsync.")] - public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + - "s as an overload of MinByAsync.")] - public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + - "s as an overload of MinByAsync.")] - public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + - "s as an overload of MinByAsync.")] - public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + - "s as an overload of MinByAsync.")] - public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + - "s as an overload of MinByAsync.")] - public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + - "s as an overload of MinByAsync.")] - public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + - "s as an overload of MinByAsync.")] - public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + - "s as an overload of MinByAsync.")] - public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + - "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + - "s as an overload of MinByAsync.")] - public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Collections.Generic.IAsyncEnumerable OfType(this System.Collections.Generic.IAsyncEnumerable source) { } - public static System.Linq.IOrderedAsyncEnumerable OrderBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector) { } - public static System.Linq.IOrderedAsyncEnumerable OrderBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IComparer comparer) { } - public static System.Linq.IOrderedAsyncEnumerable OrderByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector) { } - public static System.Linq.IOrderedAsyncEnumerable OrderByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer comparer) { } - public static System.Linq.IOrderedAsyncEnumerable OrderByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector) { } - public static System.Linq.IOrderedAsyncEnumerable OrderByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer comparer) { } - public static System.Linq.IOrderedAsyncEnumerable OrderByDescending(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector) { } - public static System.Linq.IOrderedAsyncEnumerable OrderByDescending(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IComparer comparer) { } - public static System.Linq.IOrderedAsyncEnumerable OrderByDescendingAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector) { } - public static System.Linq.IOrderedAsyncEnumerable OrderByDescendingAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer comparer) { } - public static System.Linq.IOrderedAsyncEnumerable OrderByDescendingAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector) { } - public static System.Linq.IOrderedAsyncEnumerable OrderByDescendingAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer comparer) { } - public static System.Collections.Generic.IAsyncEnumerable Prepend(this System.Collections.Generic.IAsyncEnumerable source, TSource element) { } - public static System.Collections.Generic.IAsyncEnumerable Range(int start, int count) { } - public static System.Collections.Generic.IAsyncEnumerable Repeat(TResult element, int count) { } - public static System.Collections.Generic.IAsyncEnumerable Reverse(this System.Collections.Generic.IAsyncEnumerable source) { } - public static System.Collections.Generic.IAsyncEnumerable Select(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector) { } - public static System.Collections.Generic.IAsyncEnumerable Select(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector) { } - [System.Obsolete("Use Aggregate. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and t" + - "he AggregateAwait and AggregateAwaitWithCancellationAsync functionality now exis" + - "ts as overloads of Aggregate.")] - public static System.Collections.Generic.IAsyncEnumerable SelectAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector) { } - public static System.Collections.Generic.IAsyncEnumerable SelectAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector) { } - public static System.Collections.Generic.IAsyncEnumerable SelectAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector) { } - public static System.Collections.Generic.IAsyncEnumerable SelectAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector) { } - public static System.Collections.Generic.IAsyncEnumerable SelectMany(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector) { } - public static System.Collections.Generic.IAsyncEnumerable SelectMany(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector) { } - public static System.Collections.Generic.IAsyncEnumerable SelectMany(this System.Collections.Generic.IAsyncEnumerable source, System.Func> collectionSelector, System.Func resultSelector) { } - public static System.Collections.Generic.IAsyncEnumerable SelectMany(this System.Collections.Generic.IAsyncEnumerable source, System.Func> collectionSelector, System.Func resultSelector) { } - public static System.Collections.Generic.IAsyncEnumerable SelectManyAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> selector) { } - public static System.Collections.Generic.IAsyncEnumerable SelectManyAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> selector) { } - public static System.Collections.Generic.IAsyncEnumerable SelectManyAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> collectionSelector, System.Func> resultSelector) { } - public static System.Collections.Generic.IAsyncEnumerable SelectManyAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> collectionSelector, System.Func> resultSelector) { } - public static System.Collections.Generic.IAsyncEnumerable SelectManyAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> selector) { } - public static System.Collections.Generic.IAsyncEnumerable SelectManyAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> selector) { } - public static System.Collections.Generic.IAsyncEnumerable SelectManyAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> collectionSelector, System.Func> resultSelector) { } - public static System.Collections.Generic.IAsyncEnumerable SelectManyAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> collectionSelector, System.Func> resultSelector) { } - public static System.Threading.Tasks.ValueTask SequenceEqualAsync(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SequenceEqualAsync(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SingleAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SingleAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SingleAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SingleAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SingleOrDefaultAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SingleOrDefaultAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SingleOrDefaultAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SingleOrDefaultAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Collections.Generic.IAsyncEnumerable Skip(this System.Collections.Generic.IAsyncEnumerable source, int count) { } - public static System.Collections.Generic.IAsyncEnumerable SkipLast(this System.Collections.Generic.IAsyncEnumerable source, int count) { } - public static System.Collections.Generic.IAsyncEnumerable SkipWhile(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate) { } - public static System.Collections.Generic.IAsyncEnumerable SkipWhile(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate) { } - public static System.Collections.Generic.IAsyncEnumerable SkipWhileAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } - public static System.Collections.Generic.IAsyncEnumerable SkipWhileAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } - public static System.Collections.Generic.IAsyncEnumerable SkipWhileAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } - public static System.Collections.Generic.IAsyncEnumerable SkipWhileAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Collections.Generic.IAsyncEnumerable Take(this System.Collections.Generic.IAsyncEnumerable source, int count) { } - public static System.Collections.Generic.IAsyncEnumerable TakeLast(this System.Collections.Generic.IAsyncEnumerable source, int count) { } - public static System.Collections.Generic.IAsyncEnumerable TakeWhile(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate) { } - public static System.Collections.Generic.IAsyncEnumerable TakeWhile(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate) { } - public static System.Collections.Generic.IAsyncEnumerable TakeWhileAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } - public static System.Collections.Generic.IAsyncEnumerable TakeWhileAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } - public static System.Collections.Generic.IAsyncEnumerable TakeWhileAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } - public static System.Collections.Generic.IAsyncEnumerable TakeWhileAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } - public static System.Linq.IOrderedAsyncEnumerable ThenBy(this System.Linq.IOrderedAsyncEnumerable source, System.Func keySelector) { } - public static System.Linq.IOrderedAsyncEnumerable ThenBy(this System.Linq.IOrderedAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IComparer comparer) { } - public static System.Linq.IOrderedAsyncEnumerable ThenByAwait(this System.Linq.IOrderedAsyncEnumerable source, System.Func> keySelector) { } - public static System.Linq.IOrderedAsyncEnumerable ThenByAwait(this System.Linq.IOrderedAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer comparer) { } - public static System.Linq.IOrderedAsyncEnumerable ThenByAwaitWithCancellation(this System.Linq.IOrderedAsyncEnumerable source, System.Func> keySelector) { } - public static System.Linq.IOrderedAsyncEnumerable ThenByAwaitWithCancellation(this System.Linq.IOrderedAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer comparer) { } - public static System.Linq.IOrderedAsyncEnumerable ThenByDescending(this System.Linq.IOrderedAsyncEnumerable source, System.Func keySelector) { } - public static System.Linq.IOrderedAsyncEnumerable ThenByDescending(this System.Linq.IOrderedAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IComparer comparer) { } - public static System.Linq.IOrderedAsyncEnumerable ThenByDescendingAwait(this System.Linq.IOrderedAsyncEnumerable source, System.Func> keySelector) { } - public static System.Linq.IOrderedAsyncEnumerable ThenByDescendingAwait(this System.Linq.IOrderedAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer comparer) { } - public static System.Linq.IOrderedAsyncEnumerable ThenByDescendingAwaitWithCancellation(this System.Linq.IOrderedAsyncEnumerable source, System.Func> keySelector) { } - public static System.Linq.IOrderedAsyncEnumerable ThenByDescendingAwaitWithCancellation(this System.Linq.IOrderedAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer comparer) { } - public static System.Threading.Tasks.ValueTask ToArrayAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Collections.Generic.IAsyncEnumerable ToAsyncEnumerable(this System.Collections.Generic.IEnumerable source) { } - public static System.Collections.Generic.IAsyncEnumerable ToAsyncEnumerable(this System.IObservable source) { } - public static System.Collections.Generic.IAsyncEnumerable ToAsyncEnumerable(this System.Threading.Tasks.Task task) { } - public static System.Threading.Tasks.ValueTask> ToDictionaryAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Threading.CancellationToken cancellationToken = default) - where TKey : notnull { } - public static System.Threading.Tasks.ValueTask> ToDictionaryAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) - where TKey : notnull { } - public static System.Threading.Tasks.ValueTask> ToDictionaryAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Func elementSelector, System.Threading.CancellationToken cancellationToken = default) - where TKey : notnull { } - public static System.Threading.Tasks.ValueTask> ToDictionaryAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) - where TKey : notnull { } - public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Threading.CancellationToken cancellationToken = default) - where TKey : notnull { } - public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) - where TKey : notnull { } - public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Threading.CancellationToken cancellationToken = default) - where TKey : notnull { } - public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) - where TKey : notnull { } - public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Threading.CancellationToken cancellationToken = default) - where TKey : notnull { } - public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) - where TKey : notnull { } - public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Threading.CancellationToken cancellationToken = default) - where TKey : notnull { } - public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) - where TKey : notnull { } - public static System.Collections.Generic.IEnumerable ToEnumerable(this System.Collections.Generic.IAsyncEnumerable source) { } - public static System.Threading.Tasks.ValueTask> ToHashSetAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToHashSetAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToListAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToLookupAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToLookupAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToLookupAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Func elementSelector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToLookupAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToLookupAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToLookupAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToLookupAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToLookupAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToLookupAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToLookupAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToLookupAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToLookupAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.IObservable ToObservable(this System.Collections.Generic.IAsyncEnumerable source) { } - public static System.Collections.Generic.IAsyncEnumerable Union(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second) { } - public static System.Collections.Generic.IAsyncEnumerable Union(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Collections.Generic.IAsyncEnumerable Where(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate) { } - public static System.Collections.Generic.IAsyncEnumerable Where(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate) { } - public static System.Collections.Generic.IAsyncEnumerable WhereAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } - public static System.Collections.Generic.IAsyncEnumerable WhereAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } - public static System.Collections.Generic.IAsyncEnumerable WhereAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } - public static System.Collections.Generic.IAsyncEnumerable WhereAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } - [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { - "First", - "Second"})] - public static System.Collections.Generic.IAsyncEnumerable> Zip(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second) { } - public static System.Collections.Generic.IAsyncEnumerable Zip(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second, System.Func selector) { } - public static System.Collections.Generic.IAsyncEnumerable ZipAwait(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second, System.Func> selector) { } - public static System.Collections.Generic.IAsyncEnumerable ZipAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second, System.Func> selector) { } - } - public interface IAsyncGrouping : System.Collections.Generic.IAsyncEnumerable - { - TKey Key { get; } - } - [System.Obsolete("Use the definition of this type in the System.Interactive.Async NuGet package Sys" + - "tem.Linq.Async instead.")] - public interface IAsyncIListProvider : System.Collections.Generic.IAsyncEnumerable - { - System.Threading.Tasks.ValueTask GetCountAsync(bool onlyIfCheap, System.Threading.CancellationToken cancellationToken); - System.Threading.Tasks.ValueTask ToArrayAsync(System.Threading.CancellationToken cancellationToken); - System.Threading.Tasks.ValueTask> ToListAsync(System.Threading.CancellationToken cancellationToken); - } - public interface IOrderedAsyncEnumerable : System.Collections.Generic.IAsyncEnumerable - { - System.Linq.IOrderedAsyncEnumerable CreateOrderedEnumerable(System.Func> keySelector, System.Collections.Generic.IComparer? comparer, bool descending); - System.Linq.IOrderedAsyncEnumerable CreateOrderedEnumerable(System.Func keySelector, System.Collections.Generic.IComparer? comparer, bool descending); - System.Linq.IOrderedAsyncEnumerable CreateOrderedEnumerable(System.Func> keySelector, System.Collections.Generic.IComparer? comparer, bool descending); - } -} \ No newline at end of file diff --git a/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemLinqAsync.verified.cs b/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemLinqAsync.verified.cs index 2734bde4b..c81fb1a09 100644 --- a/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemLinqAsync.verified.cs +++ b/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemLinqAsync.verified.cs @@ -1,7 +1,7 @@ [assembly: System.CLSCompliant(true)] [assembly: System.Resources.NeutralResourcesLanguage("en-US")] [assembly: System.Runtime.InteropServices.ComVisible(false)] -[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName=".NET 6.0")] +[assembly: System.Runtime.Versioning.TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName=".NET Standard 2.1")] namespace System.Collections.Generic { public static class AsyncEnumerator @@ -18,18 +18,45 @@ public static class AsyncEnumerable public static System.Threading.Tasks.ValueTask AggregateAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func accumulator, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask AggregateAsync(this System.Collections.Generic.IAsyncEnumerable source, TAccumulate seed, System.Func accumulator, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask AggregateAsync(this System.Collections.Generic.IAsyncEnumerable source, TAccumulate seed, System.Func accumulator, System.Func resultSelector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use AggregateAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, " + + "and the AggregateAwaitAsync now exists as overloads of AggregateAsync.")] public static System.Threading.Tasks.ValueTask AggregateAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> accumulator, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use AggregateAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, " + + "and the AggregateAwaitAsync functionality now exists as overloads of AggregateAs" + + "ync.")] public static System.Threading.Tasks.ValueTask AggregateAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, TAccumulate seed, System.Func> accumulator, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use AggregateAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, " + + "and the AggregateAwaitAsync functionality now exists as overloads of AggregateAs" + + "ync.")] public static System.Threading.Tasks.ValueTask AggregateAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, TAccumulate seed, System.Func> accumulator, System.Func> resultSelector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use AggregateAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, " + + "and the AggregateAwaitWithCancellationAsync functionality now exists as overload" + + "s of AggregateAsync.")] public static System.Threading.Tasks.ValueTask AggregateAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> accumulator, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use AggregateAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, " + + "and the AggregateAwaitWithCancellationAsync functionality now exists as overload" + + "s of AggregateAsync.")] public static System.Threading.Tasks.ValueTask AggregateAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, TAccumulate seed, System.Func> accumulator, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use AggregateAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, " + + "and the AggregateAwaitWithCancellationAsync functionality now exists as overload" + + "s of AggregateAsync.")] public static System.Threading.Tasks.ValueTask AggregateAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, TAccumulate seed, System.Func> accumulator, System.Func> resultSelector, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask AllAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use AllAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and th" + + "e AllAwaitAsync functionality now exists as overloads of All.")] public static System.Threading.Tasks.ValueTask AllAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use AllAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and th" + + "e AllAwaitWithCancellationAsync functionality now exists as overloads of AllAsyn" + + "c.")] public static System.Threading.Tasks.ValueTask AllAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask AnyAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask AnyAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use AnyAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and th" + + "e AnyAwaitAsync functionality now exists as overloads of AnyAsync.")] public static System.Threading.Tasks.ValueTask AnyAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use AnyAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and th" + + "e AnyAwaitWithCancellationAsync functionality now exists as overloads of AnyAsyn" + + "c.")] public static System.Threading.Tasks.ValueTask AnyAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } public static System.Collections.Generic.IAsyncEnumerable Append(this System.Collections.Generic.IAsyncEnumerable source, TSource element) { } public static System.Collections.Generic.IAsyncEnumerable AsAsyncEnumerable(this System.Collections.Generic.IAsyncEnumerable source) { } @@ -53,25 +80,45 @@ public static System.Threading.Tasks.ValueTask AverageAsync(this public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask AverageAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then AverageAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its AverageAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use AverageAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } public static System.Collections.Generic.IAsyncEnumerable Cast(this System.Collections.Generic.IAsyncEnumerable source) { } public static System.Collections.Generic.IAsyncEnumerable Concat(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second) { } @@ -79,7 +126,12 @@ public static System.Threading.Tasks.ValueTask ContainsAsync(this public static System.Threading.Tasks.ValueTask ContainsAsync(this System.Collections.Generic.IAsyncEnumerable source, TSource value, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask CountAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask CountAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use CountAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the CountAwaitAsync functionality now exists as overloads of CountAsync.")] public static System.Threading.Tasks.ValueTask CountAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use CountAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the CountAwaitWithCancellationAsync functionality now exists as overloads of Cou" + + "ntAsync.")] public static System.Threading.Tasks.ValueTask CountAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } public static System.Collections.Generic.IAsyncEnumerable Create(System.Func> getAsyncEnumerator) { } public static System.Collections.Generic.IAsyncEnumerable DefaultIfEmpty(this System.Collections.Generic.IAsyncEnumerable source) { } @@ -93,17 +145,34 @@ public static System.Collections.Generic.IAsyncEnumerable Except Except(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second, System.Collections.Generic.IEqualityComparer? comparer) { } public static System.Threading.Tasks.ValueTask FirstAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask FirstAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use FirstAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the FirstAwaitAsync functionality now exists as overloads of FirstAsync.")] public static System.Threading.Tasks.ValueTask FirstAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use FirstAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the FirstAwaitWithCancellationAsync functionality now exists as overloads of Fir" + + "stAsync.")] public static System.Threading.Tasks.ValueTask FirstAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask FirstOrDefaultAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask FirstOrDefaultAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use FirstOrDefaultAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumera" + + "ble, and the FirstOrDefaultAwaitAsync functionality now exists as overloads of F" + + "irstOrDefaultAsync.")] public static System.Threading.Tasks.ValueTask FirstOrDefaultAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use FirstOrDefaultAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumera" + + "ble, and the FirstOrDefaultAwaitWithCancellationAsync functionality now exists a" + + "s overloads of FirstOrDefaultAsync.")] public static System.Threading.Tasks.ValueTask FirstOrDefaultAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use the language support for async foreach instead.")] public static System.Threading.Tasks.Task ForEachAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Action action, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use the language support for async foreach instead.")] public static System.Threading.Tasks.Task ForEachAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Action action, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use the language support for async foreach instead.")] public static System.Threading.Tasks.Task ForEachAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func action, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use the language support for async foreach instead.")] public static System.Threading.Tasks.Task ForEachAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func action, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use the language support for async foreach instead.")] public static System.Threading.Tasks.Task ForEachAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func action, System.Threading.CancellationToken cancellationToken) { } + [System.Obsolete("Use the language support for async foreach instead.")] public static System.Threading.Tasks.Task ForEachAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func action, System.Threading.CancellationToken cancellationToken) { } public static System.Collections.Generic.IAsyncEnumerable> GroupBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector) { } public static System.Collections.Generic.IAsyncEnumerable> GroupBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } @@ -113,47 +182,122 @@ public static System.Collections.Generic.IAsyncEnumerable GroupBy GroupBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Func, TResult> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } public static System.Collections.Generic.IAsyncEnumerable GroupBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Func elementSelector, System.Func, TResult> resultSelector) { } public static System.Collections.Generic.IAsyncEnumerable GroupBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Func elementSelector, System.Func, TResult> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwait functionality now exists as overloads of GroupBy.")] public static System.Collections.Generic.IAsyncEnumerable> GroupByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwait functionality now exists as overloads of GroupBy.")] public static System.Collections.Generic.IAsyncEnumerable> GroupByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwait functionality now exists as overloads of GroupBy.")] public static System.Collections.Generic.IAsyncEnumerable> GroupByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwait functionality now exists as overloads of GroupBy.")] public static System.Collections.Generic.IAsyncEnumerable GroupByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func, System.Threading.Tasks.ValueTask> resultSelector) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwait functionality now exists as overloads of GroupBy.")] public static System.Collections.Generic.IAsyncEnumerable> GroupByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwait functionality now exists as overloads of GroupBy.")] public static System.Collections.Generic.IAsyncEnumerable GroupByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func, System.Threading.Tasks.ValueTask> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwait functionality now exists as overloads of GroupBy.")] public static System.Collections.Generic.IAsyncEnumerable GroupByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Func, System.Threading.Tasks.ValueTask> resultSelector) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwait functionality now exists as overloads of GroupBy.")] public static System.Collections.Generic.IAsyncEnumerable GroupByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Func, System.Threading.Tasks.ValueTask> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwaitWithCancellationAsync functionality now exists as overloads of Grou" + + "pBy.")] public static System.Collections.Generic.IAsyncEnumerable> GroupByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwaitWithCancellationAsync functionality now exists as overloads of Grou" + + "pBy.")] public static System.Collections.Generic.IAsyncEnumerable> GroupByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwaitWithCancellationAsync functionality now exists as overloads of Grou" + + "pBy.")] public static System.Collections.Generic.IAsyncEnumerable> GroupByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwaitWithCancellationAsync functionality now exists as overloads of Grou" + + "pBy.")] public static System.Collections.Generic.IAsyncEnumerable GroupByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask> resultSelector) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwaitWithCancellationAsync functionality now exists as overloads of Grou" + + "pBy.")] public static System.Collections.Generic.IAsyncEnumerable> GroupByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwaitWithCancellationAsync functionality now exists as overloads of Grou" + + "pBy.")] public static System.Collections.Generic.IAsyncEnumerable GroupByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwaitWithCancellationAsync functionality now exists as overloads of Grou" + + "pBy.")] public static System.Collections.Generic.IAsyncEnumerable GroupByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Func, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask> resultSelector) { } + [System.Obsolete("Use GroupBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " GroupByAwaitWithCancellationAsync functionality now exists as overloads of Grou" + + "pBy.")] public static System.Collections.Generic.IAsyncEnumerable GroupByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Func, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } public static System.Collections.Generic.IAsyncEnumerable GroupJoin(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func outerKeySelector, System.Func innerKeySelector, System.Func, TResult> resultSelector) { } public static System.Collections.Generic.IAsyncEnumerable GroupJoin(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func outerKeySelector, System.Func innerKeySelector, System.Func, TResult> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + [System.Obsolete("Use GroupJoin. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and t" + + "he GroupJoinAwait functionality now exists as overloads of GroupJoin.")] public static System.Collections.Generic.IAsyncEnumerable GroupJoinAwait(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func> outerKeySelector, System.Func> innerKeySelector, System.Func, System.Threading.Tasks.ValueTask> resultSelector) { } + [System.Obsolete("Use GroupJoin. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and t" + + "he GroupJoinAwait functionality now exists as overloads of GroupJoin.")] public static System.Collections.Generic.IAsyncEnumerable GroupJoinAwait(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func> outerKeySelector, System.Func> innerKeySelector, System.Func, System.Threading.Tasks.ValueTask> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + [System.Obsolete("Use GroupJoin. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and t" + + "he GroupJoinAwaitWithCancellation functionality now exists as overloads of Group" + + "Join.")] public static System.Collections.Generic.IAsyncEnumerable GroupJoinAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func> outerKeySelector, System.Func> innerKeySelector, System.Func, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask> resultSelector) { } + [System.Obsolete("Use GroupJoin. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and t" + + "he GroupJoinAwaitWithCancellation functionality now exists as overloads of Group" + + "Join.")] public static System.Collections.Generic.IAsyncEnumerable GroupJoinAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func> outerKeySelector, System.Func> innerKeySelector, System.Func, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } public static System.Collections.Generic.IAsyncEnumerable Intersect(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second) { } public static System.Collections.Generic.IAsyncEnumerable Intersect(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second, System.Collections.Generic.IEqualityComparer? comparer) { } public static System.Collections.Generic.IAsyncEnumerable Join(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func outerKeySelector, System.Func innerKeySelector, System.Func resultSelector) { } public static System.Collections.Generic.IAsyncEnumerable Join(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func outerKeySelector, System.Func innerKeySelector, System.Func resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + [System.Obsolete("Use Join. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the Jo" + + "inAwait functionality now exists as overloads of Join.")] public static System.Collections.Generic.IAsyncEnumerable JoinAwait(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func> outerKeySelector, System.Func> innerKeySelector, System.Func> resultSelector) { } + [System.Obsolete("Use Join. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the Jo" + + "inAwait functionality now exists as overloads of Join.")] public static System.Collections.Generic.IAsyncEnumerable JoinAwait(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func> outerKeySelector, System.Func> innerKeySelector, System.Func> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } + [System.Obsolete("Use Join. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the Jo" + + "inAwaitWithCancellation functionality now exists as overloads of Join.")] public static System.Collections.Generic.IAsyncEnumerable JoinAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func> outerKeySelector, System.Func> innerKeySelector, System.Func> resultSelector) { } + [System.Obsolete("Use Join. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the Jo" + + "inAwaitWithCancellation functionality now exists as overloads of Join.")] public static System.Collections.Generic.IAsyncEnumerable JoinAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Func> outerKeySelector, System.Func> innerKeySelector, System.Func> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } public static System.Threading.Tasks.ValueTask LastAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask LastAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use LastAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and t" + + "he LastAwaitAsync functionality now exists as overloads of LastAsync.")] public static System.Threading.Tasks.ValueTask LastAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use LastAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and t" + + "he LastAwaitWithCancellationAsync functionality now exists as overloads of LastA" + + "sync.")] public static System.Threading.Tasks.ValueTask LastAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask LastOrDefaultAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask LastOrDefaultAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use LastOrDefaultAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerab" + + "le, and the LastOrDefaultAwaitAsync functionality now exists as overloads of Las" + + "tOrDefaultAsync.")] public static System.Threading.Tasks.ValueTask LastOrDefaultAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use LastOrDefaultAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerab" + + "le, and the LastOrDefaultAwaitWithCancellationAsync functionality now exists as " + + "overloads of LastOrDefaultAsync.")] public static System.Threading.Tasks.ValueTask LastOrDefaultAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask LongCountAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask LongCountAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use LongCountAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, " + + "and the LongCountAwaitAsync functionality now exists as overloads of LongCountAs" + + "ync.")] public static System.Threading.Tasks.ValueTask LongCountAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use LongCountAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, " + + "and the LongCountAwaitWithCancellationAsync functionality now exists as overload" + + "s of LongCountAsync.")] public static System.Threading.Tasks.ValueTask LongCountAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } @@ -176,28 +320,97 @@ public static System.Threading.Tasks.ValueTask MaxAsync(this Sys public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by the MaxAsync overload that took a selec" + + "tor callback now exists as an overload of MaxByAsync.")] public static System.Threading.Tasks.ValueTask MaxAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitAsync now exists as an overload" + + " of MaxByAsync.")] public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitAsync now exists as an overload" + + " of MaxByAsync.")] public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitAsync now exists as an overload" + + " of MaxByAsync.")] public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitAsync now exists as an overload" + + " of MaxByAsync.")] public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitAsync now exists as an overload" + + " of MaxByAsync.")] public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitAsync now exists as an overload" + + " of MaxByAsync.")] public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitAsync now exists as an overload" + + " of MaxByAsync.")] public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitAsync now exists as an overload" + + " of MaxByAsync.")] public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitAsync now exists as an overload" + + " of MaxByAsync.")] public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitAsync now exists as an overload" + + " of MaxByAsync.")] public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitAsync now exists as an overload" + + " of MaxByAsync.")] public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + + "s as an overload of MaxByAsync.")] public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + + "s as an overload of MaxByAsync.")] public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + + "s as an overload of MaxByAsync.")] public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + + "s as an overload of MaxByAsync.")] public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + + "s as an overload of MaxByAsync.")] public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + + "s as an overload of MaxByAsync.")] public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + + "s as an overload of MaxByAsync.")] public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + + "s as an overload of MaxByAsync.")] public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + + "s as an overload of MaxByAsync.")] public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + + "s as an overload of MaxByAsync.")] public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MaxByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MaxAwaitWithCancellationAsync now exist" + + "s as an overload of MaxByAsync.")] public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } @@ -220,41 +433,130 @@ public static System.Threading.Tasks.ValueTask MinAsync(this Sys public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by the MinAsync overload that took a selec" + + "tor callback now exists as an overload of MinByAsync.")] public static System.Threading.Tasks.ValueTask MinAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitAsync now exists as an overload" + + " of MinByAsync.")] public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitAsync now exists as an overload" + + " of MinByAsync.")] public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitAsync now exists as an overload" + + " of MinByAsync.")] public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitAsync now exists as an overload" + + " of MinByAsync.")] public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitAsync now exists as an overload" + + " of MinByAsync.")] public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitAsync now exists as an overload" + + " of MinByAsync.")] public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitAsync now exists as an overload" + + " of MinByAsync.")] public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitAsync now exists as an overload" + + " of MinByAsync.")] public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitAsync now exists as an overload" + + " of MinByAsync.")] public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitAsync now exists as an overload" + + " of MinByAsync.")] public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitAsync now exists as an overload" + + " of MinByAsync.")] public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + + "s as an overload of MinByAsync.")] public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + + "s as an overload of MinByAsync.")] public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + + "s as an overload of MinByAsync.")] public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + + "s as an overload of MinByAsync.")] public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + + "s as an overload of MinByAsync.")] public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + + "s as an overload of MinByAsync.")] public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + + "s as an overload of MinByAsync.")] public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + + "s as an overload of MinByAsync.")] public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + + "s as an overload of MinByAsync.")] public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + + "s as an overload of MinByAsync.")] public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use MinByAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the functionality previously provided by MinAwaitWithCancellationAsync now exist" + + "s as an overload of MinByAsync.")] public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } public static System.Collections.Generic.IAsyncEnumerable OfType(this System.Collections.Generic.IAsyncEnumerable source) { } public static System.Linq.IOrderedAsyncEnumerable OrderBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector) { } public static System.Linq.IOrderedAsyncEnumerable OrderBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IComparer comparer) { } + [System.Obsolete("Use OrderBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " OrderByAwait functionality now exists as overloads of OrderBy.")] public static System.Linq.IOrderedAsyncEnumerable OrderByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector) { } + [System.Obsolete("Use OrderBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " OrderByAwait functionality now exists as overloads of OrderBy.")] public static System.Linq.IOrderedAsyncEnumerable OrderByAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer comparer) { } + [System.Obsolete("Use OrderBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " OrderByAwaitWithCancellation functionality now exists as overloads of OrderBy.")] public static System.Linq.IOrderedAsyncEnumerable OrderByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector) { } + [System.Obsolete("Use OrderBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the" + + " OrderByAwaitWithCancellation functionality now exists as overloads of OrderBy.")] public static System.Linq.IOrderedAsyncEnumerable OrderByAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer comparer) { } public static System.Linq.IOrderedAsyncEnumerable OrderByDescending(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector) { } public static System.Linq.IOrderedAsyncEnumerable OrderByDescending(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IComparer comparer) { } + [System.Obsolete("Use OrderByDescending. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerabl" + + "e, and the OrderByDescendingAwait functionality now exists as overloads of Order" + + "ByDescending.")] public static System.Linq.IOrderedAsyncEnumerable OrderByDescendingAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector) { } + [System.Obsolete("Use OrderByDescending. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerabl" + + "e, and the OrderByDescendingAwait functionality now exists as overloads of Order" + + "ByDescending.")] public static System.Linq.IOrderedAsyncEnumerable OrderByDescendingAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer comparer) { } + [System.Obsolete("Use OrderByDescending. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerabl" + + "e, and the OrderByDescendingAwaitWithCancellation functionality now exists as ov" + + "erloads of OrderByDescending.")] public static System.Linq.IOrderedAsyncEnumerable OrderByDescendingAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector) { } + [System.Obsolete("Use OrderByDescending. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerabl" + + "e, and the OrderByDescendingAwaitWithCancellation functionality now exists as ov" + + "erloads of OrderByDescending.")] public static System.Linq.IOrderedAsyncEnumerable OrderByDescendingAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer comparer) { } public static System.Collections.Generic.IAsyncEnumerable Prepend(this System.Collections.Generic.IAsyncEnumerable source, TSource element) { } public static System.Collections.Generic.IAsyncEnumerable Range(int start, int count) { } @@ -262,39 +564,88 @@ public static System.Collections.Generic.IAsyncEnumerable Repeat Reverse(this System.Collections.Generic.IAsyncEnumerable source) { } public static System.Collections.Generic.IAsyncEnumerable Select(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector) { } public static System.Collections.Generic.IAsyncEnumerable Select(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector) { } + [System.Obsolete("Use Select. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the " + + "SelectAwait functionality now exists as overloads of Select.")] public static System.Collections.Generic.IAsyncEnumerable SelectAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector) { } + [System.Obsolete("Use Select. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the " + + "SelectAwait functionality now exists as overloads of Select.")] public static System.Collections.Generic.IAsyncEnumerable SelectAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector) { } + [System.Obsolete("Use Select. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the " + + "SelectAwaitWithCancellation functionality now exists as overloads of Select.")] public static System.Collections.Generic.IAsyncEnumerable SelectAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector) { } + [System.Obsolete("Use Select. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the " + + "SelectAwaitWithCancellation functionality now exists as overloads of Select.")] public static System.Collections.Generic.IAsyncEnumerable SelectAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector) { } public static System.Collections.Generic.IAsyncEnumerable SelectMany(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector) { } public static System.Collections.Generic.IAsyncEnumerable SelectMany(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector) { } public static System.Collections.Generic.IAsyncEnumerable SelectMany(this System.Collections.Generic.IAsyncEnumerable source, System.Func> collectionSelector, System.Func resultSelector) { } public static System.Collections.Generic.IAsyncEnumerable SelectMany(this System.Collections.Generic.IAsyncEnumerable source, System.Func> collectionSelector, System.Func resultSelector) { } + [System.Obsolete("Use SelectMany. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the SelectManyAwait functionality now exists as overloads of SelectMany.")] public static System.Collections.Generic.IAsyncEnumerable SelectManyAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> selector) { } + [System.Obsolete("Use SelectMany. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the SelectManyAwait functionality now exists as overloads of SelectMany.")] public static System.Collections.Generic.IAsyncEnumerable SelectManyAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> selector) { } + [System.Obsolete("Use SelectMany. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the SelectManyAwait functionality now exists as overloads of SelectMany.")] public static System.Collections.Generic.IAsyncEnumerable SelectManyAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> collectionSelector, System.Func> resultSelector) { } + [System.Obsolete("Use SelectMany. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the SelectManyAwait functionality now exists as overloads of SelectMany.")] public static System.Collections.Generic.IAsyncEnumerable SelectManyAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> collectionSelector, System.Func> resultSelector) { } + [System.Obsolete("Use SelectMany. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the SelectManyAwaitWithCancellation functionality now exists as overloads of Sel" + + "ectMany.")] public static System.Collections.Generic.IAsyncEnumerable SelectManyAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> selector) { } + [System.Obsolete("Use SelectMany. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the SelectManyAwaitWithCancellation functionality now exists as overloads of Sel" + + "ectMany.")] public static System.Collections.Generic.IAsyncEnumerable SelectManyAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> selector) { } + [System.Obsolete("Use SelectMany. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the SelectManyAwaitWithCancellation functionality now exists as overloads of Sel" + + "ectMany.")] public static System.Collections.Generic.IAsyncEnumerable SelectManyAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> collectionSelector, System.Func> resultSelector) { } + [System.Obsolete("Use SelectMany. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and " + + "the SelectManyAwaitWithCancellation functionality now exists as overloads of Sel" + + "ectMany.")] public static System.Collections.Generic.IAsyncEnumerable SelectManyAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func>> collectionSelector, System.Func> resultSelector) { } public static System.Threading.Tasks.ValueTask SequenceEqualAsync(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask SequenceEqualAsync(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask SingleAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask SingleAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use SingleAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and" + + " the SingleAwaitAsync functionality now exists as overloads of SingleAsync.")] public static System.Threading.Tasks.ValueTask SingleAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use SingleAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and" + + " the SingleAwaitWithCancellationAsync functionality now exists as overloads of S" + + "ingleAsync.")] public static System.Threading.Tasks.ValueTask SingleAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask SingleOrDefaultAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask SingleOrDefaultAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use SingleOrDefaultAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumer" + + "able, and the SingleOrDefaultAwaitAsync functionality now exists as overloads of" + + " SingleOrDefaultAsync.")] public static System.Threading.Tasks.ValueTask SingleOrDefaultAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use SingleOrDefaultAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumer" + + "able, and the SingleOrDefaultAwaitWithCancellationAsync functionality now exists" + + " as overloads of SingleOrDefaultAsync.")] public static System.Threading.Tasks.ValueTask SingleOrDefaultAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Threading.CancellationToken cancellationToken = default) { } public static System.Collections.Generic.IAsyncEnumerable Skip(this System.Collections.Generic.IAsyncEnumerable source, int count) { } public static System.Collections.Generic.IAsyncEnumerable SkipLast(this System.Collections.Generic.IAsyncEnumerable source, int count) { } public static System.Collections.Generic.IAsyncEnumerable SkipWhile(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate) { } public static System.Collections.Generic.IAsyncEnumerable SkipWhile(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate) { } + [System.Obsolete("Use SkipWhile. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and t" + + "he SkipWhileAwait functionality now exists as overloads of SkipWhile.")] public static System.Collections.Generic.IAsyncEnumerable SkipWhileAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } + [System.Obsolete("Use SkipWhile. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and t" + + "he SkipWhileAwait functionality now exists as overloads of SkipWhile.")] public static System.Collections.Generic.IAsyncEnumerable SkipWhileAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } + [System.Obsolete("Use SkipWhile. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and t" + + "he SkipWhileAwaitWithCancellation functionality now exists as overloads of SkipW" + + "hile.")] public static System.Collections.Generic.IAsyncEnumerable SkipWhileAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } + [System.Obsolete("Use SkipWhile. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and t" + + "he SkipWhileAwaitWithCancellation functionality now exists as overloads of SkipW" + + "hile.")] public static System.Collections.Generic.IAsyncEnumerable SkipWhileAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } @@ -306,55 +657,115 @@ public static System.Threading.Tasks.ValueTask SumAsync(this System.Colle public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete(@"Use Select then SumAsync. System.Linq.Async (a community-supported library) has been replaced by the (Microsoft supported) IAsyncEnumerable LINQ in System.Linq.AsyncEnumerable, and its SumAsync method does not include the overloads that take a selector. So you should use Select to perform the projection and then use SumAsync on the resulting sequence.")] public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> selector, System.Threading.CancellationToken cancellationToken = default) { } public static System.Collections.Generic.IAsyncEnumerable Take(this System.Collections.Generic.IAsyncEnumerable source, int count) { } public static System.Collections.Generic.IAsyncEnumerable TakeLast(this System.Collections.Generic.IAsyncEnumerable source, int count) { } public static System.Collections.Generic.IAsyncEnumerable TakeWhile(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate) { } public static System.Collections.Generic.IAsyncEnumerable TakeWhile(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate) { } + [System.Obsolete("Use TakeWhile. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and t" + + "he TakeWhileAwait functionality now exists as overloads of TakeWhile.")] public static System.Collections.Generic.IAsyncEnumerable TakeWhileAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } + [System.Obsolete("Use TakeWhile. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and t" + + "he TakeWhileAwait functionality now exists as overloads of TakeWhile.")] public static System.Collections.Generic.IAsyncEnumerable TakeWhileAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } + [System.Obsolete("Use TakeWhile. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and t" + + "he TakeWhileAwaitWithCancellation functionality now exists as overloads of TakeW" + + "hile.")] public static System.Collections.Generic.IAsyncEnumerable TakeWhileAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } + [System.Obsolete("Use TakeWhile. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and t" + + "he TakeWhileAwaitWithCancellation functionality now exists as overloads of TakeW" + + "hile.")] public static System.Collections.Generic.IAsyncEnumerable TakeWhileAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } public static System.Linq.IOrderedAsyncEnumerable ThenBy(this System.Linq.IOrderedAsyncEnumerable source, System.Func keySelector) { } public static System.Linq.IOrderedAsyncEnumerable ThenBy(this System.Linq.IOrderedAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IComparer comparer) { } + [System.Obsolete("Use ThenBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the " + + "ThenByAwait functionality now exists as overloads of ThenBy.")] public static System.Linq.IOrderedAsyncEnumerable ThenByAwait(this System.Linq.IOrderedAsyncEnumerable source, System.Func> keySelector) { } + [System.Obsolete("Use ThenBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the " + + "ThenByAwait functionality now exists as overloads of ThenBy.")] public static System.Linq.IOrderedAsyncEnumerable ThenByAwait(this System.Linq.IOrderedAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer comparer) { } + [System.Obsolete("Use ThenBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the " + + "ThenByAwaitWithCancellation functionality now exists as overloads of ThenBy.")] public static System.Linq.IOrderedAsyncEnumerable ThenByAwaitWithCancellation(this System.Linq.IOrderedAsyncEnumerable source, System.Func> keySelector) { } + [System.Obsolete("Use ThenBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the " + + "ThenByAwaitWithCancellation functionality now exists as overloads of ThenBy.")] public static System.Linq.IOrderedAsyncEnumerable ThenByAwaitWithCancellation(this System.Linq.IOrderedAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer comparer) { } public static System.Linq.IOrderedAsyncEnumerable ThenByDescending(this System.Linq.IOrderedAsyncEnumerable source, System.Func keySelector) { } public static System.Linq.IOrderedAsyncEnumerable ThenByDescending(this System.Linq.IOrderedAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IComparer comparer) { } + [System.Obsolete("Use ThenByDescending. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable" + + ", and the ThenByDescendingAwait functionality now exists as overloads of ThenByD" + + "escending.")] public static System.Linq.IOrderedAsyncEnumerable ThenByDescendingAwait(this System.Linq.IOrderedAsyncEnumerable source, System.Func> keySelector) { } + [System.Obsolete("Use ThenByDescending. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable" + + ", and the ThenByDescendingAwait functionality now exists as overloads of ThenByD" + + "escending.")] public static System.Linq.IOrderedAsyncEnumerable ThenByDescendingAwait(this System.Linq.IOrderedAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer comparer) { } + [System.Obsolete("Use ThenByDescending. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable" + + ", and the ThenByDescendingAwaitWithCancellation functionality now exists as over" + + "loads of ThenByDescending.")] public static System.Linq.IOrderedAsyncEnumerable ThenByDescendingAwaitWithCancellation(this System.Linq.IOrderedAsyncEnumerable source, System.Func> keySelector) { } + [System.Obsolete("Use ThenByDescending. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable" + + ", and the ThenByDescendingAwaitWithCancellation functionality now exists as over" + + "loads of ThenByDescending.")] public static System.Linq.IOrderedAsyncEnumerable ThenByDescendingAwaitWithCancellation(this System.Linq.IOrderedAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IComparer comparer) { } public static System.Threading.Tasks.ValueTask ToArrayAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } public static System.Collections.Generic.IAsyncEnumerable ToAsyncEnumerable(this System.Collections.Generic.IEnumerable source) { } @@ -368,22 +779,49 @@ public static System.Collections.Generic.IAsyncEnumerable ToAsyncEnumer where TKey : notnull { } public static System.Threading.Tasks.ValueTask> ToDictionaryAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) where TKey : notnull { } + [System.Obsolete("Use ToDictionaryAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerabl" + + "e, and the ToDictionaryAwaitAsync functionality now exists as overloads of ToDic" + + "tionaryAsync.")] public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Threading.CancellationToken cancellationToken = default) where TKey : notnull { } + [System.Obsolete("Use ToDictionaryAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerabl" + + "e, and the ToDictionaryAwaitAsync functionality now exists as overloads of ToDic" + + "tionaryAsync.")] public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) where TKey : notnull { } + [System.Obsolete("Use ToDictionaryAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerabl" + + "e, and the ToDictionaryAwaitAsync functionality now exists as overloads of ToDic" + + "tionaryAsync.")] public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Threading.CancellationToken cancellationToken = default) where TKey : notnull { } + [System.Obsolete("Use ToDictionaryAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerabl" + + "e, and the ToDictionaryAwaitAsync functionality now exists as overloads of ToDic" + + "tionaryAsync.")] public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) where TKey : notnull { } + [System.Obsolete("Use ToDictionaryAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerabl" + + "e, and the ToDictionaryAwaitWithCancellationAsync functionality now exists as ov" + + "erloads of ToDictionaryAsync.")] public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Threading.CancellationToken cancellationToken = default) where TKey : notnull { } + [System.Obsolete("Use ToDictionaryAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerabl" + + "e, and the ToDictionaryAwaitWithCancellationAsync functionality now exists as ov" + + "erloads of ToDictionaryAsync.")] public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) where TKey : notnull { } + [System.Obsolete("Use ToDictionaryAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerabl" + + "e, and the ToDictionaryAwaitWithCancellationAsync functionality now exists as ov" + + "erloads of ToDictionaryAsync.")] public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Threading.CancellationToken cancellationToken = default) where TKey : notnull { } + [System.Obsolete("Use ToDictionaryAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerabl" + + "e, and the ToDictionaryAwaitWithCancellationAsync functionality now exists as ov" + + "erloads of ToDictionaryAsync.")] public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) where TKey : notnull { } + [System.Obsolete("IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and it does not impl" + + "ement this method because \'sync over async\' of this kind is an anti-pattern. Ple" + + "ase use a different strategy.")] public static System.Collections.Generic.IEnumerable ToEnumerable(this System.Collections.Generic.IAsyncEnumerable source) { } public static System.Threading.Tasks.ValueTask> ToHashSetAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask> ToHashSetAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } @@ -392,35 +830,74 @@ public static System.Collections.Generic.IEnumerable ToEnumerable> ToLookupAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask> ToLookupAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Func elementSelector, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.ValueTask> ToLookupAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use ToLookupAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, a" + + "nd the ToLookupAwaitAsync functionality now exists as overloads of ToLookupAsync" + + ".")] public static System.Threading.Tasks.ValueTask> ToLookupAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use ToLookupAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, a" + + "nd the ToLookupAwaitAsync functionality now exists as overloads of ToLookupAsync" + + ".")] public static System.Threading.Tasks.ValueTask> ToLookupAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use ToLookupAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, a" + + "nd the ToLookupAwaitAsync functionality now exists as overloads of ToLookupAsync" + + ".")] public static System.Threading.Tasks.ValueTask> ToLookupAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use ToLookupAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, a" + + "nd the ToLookupAwaitAsync functionality now exists as overloads of ToLookupAsync" + + ".")] public static System.Threading.Tasks.ValueTask> ToLookupAwaitAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use ToLookupAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, a" + + "nd the ToLookupAwaitWithCancellationAsync functionality now exists as overloads " + + "of ToLookupAsync.")] public static System.Threading.Tasks.ValueTask> ToLookupAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use ToLookupAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, a" + + "nd the ToLookupAwaitWithCancellationAsync functionality now exists as overloads " + + "of ToLookupAsync.")] public static System.Threading.Tasks.ValueTask> ToLookupAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use ToLookupAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, a" + + "nd the ToLookupAwaitWithCancellationAsync functionality now exists as overloads " + + "of ToLookupAsync.")] public static System.Threading.Tasks.ValueTask> ToLookupAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Threading.CancellationToken cancellationToken = default) { } + [System.Obsolete("Use ToLookupAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, a" + + "nd the ToLookupAwaitWithCancellationAsync functionality now exists as overloads " + + "of ToLookupAsync.")] public static System.Threading.Tasks.ValueTask> ToLookupAwaitWithCancellationAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Func> keySelector, System.Func> elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } public static System.IObservable ToObservable(this System.Collections.Generic.IAsyncEnumerable source) { } public static System.Collections.Generic.IAsyncEnumerable Union(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second) { } public static System.Collections.Generic.IAsyncEnumerable Union(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second, System.Collections.Generic.IEqualityComparer? comparer) { } public static System.Collections.Generic.IAsyncEnumerable Where(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate) { } public static System.Collections.Generic.IAsyncEnumerable Where(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate) { } + [System.Obsolete("Use Where. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the W" + + "hereAwait functionality now exists as overloads of Where.")] public static System.Collections.Generic.IAsyncEnumerable WhereAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } + [System.Obsolete("Use Where. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the W" + + "hereAwait functionality now exists as overloads of Where.")] public static System.Collections.Generic.IAsyncEnumerable WhereAwait(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } + [System.Obsolete("Use Where. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the W" + + "hereAwaitWithCancellation functionality now exists as overloads of Where.")] public static System.Collections.Generic.IAsyncEnumerable WhereAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } + [System.Obsolete("Use Where. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the W" + + "hereAwaitWithCancellation functionality now exists as overloads of Where.")] public static System.Collections.Generic.IAsyncEnumerable WhereAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate) { } [return: System.Runtime.CompilerServices.TupleElementNames(new string[] { "First", "Second"})] public static System.Collections.Generic.IAsyncEnumerable> Zip(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second) { } public static System.Collections.Generic.IAsyncEnumerable Zip(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second, System.Func selector) { } + [System.Obsolete("Use Zip. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the Zip" + + "Await functionality now exists as overloads of Zip.")] public static System.Collections.Generic.IAsyncEnumerable ZipAwait(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second, System.Func> selector) { } + [System.Obsolete("Use Zip. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the Zip" + + "AwaitWithCancellation functionality now exists as overloads of Zip.")] public static System.Collections.Generic.IAsyncEnumerable ZipAwaitWithCancellation(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second, System.Func> selector) { } } public interface IAsyncGrouping : System.Collections.Generic.IAsyncEnumerable { TKey Key { get; } } + [System.Obsolete("This interface was always unsupported, and the IAsyncEnumerable LINQ implement" + + "ation in System.Linq.AsyncEnumerable does not recognize it, so this no longer se" + + "rves a purpose")] public interface IAsyncIListProvider : System.Collections.Generic.IAsyncEnumerable { System.Threading.Tasks.ValueTask GetCountAsync(bool onlyIfCheap, System.Threading.CancellationToken cancellationToken); diff --git a/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemLinqAsyncQueryable.received.cs b/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemLinqAsyncQueryable.received.cs deleted file mode 100644 index 33196b616..000000000 --- a/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemLinqAsyncQueryable.received.cs +++ /dev/null @@ -1,413 +0,0 @@ -[assembly: System.CLSCompliant(true)] -[assembly: System.Resources.NeutralResourcesLanguage("en-US")] -[assembly: System.Runtime.InteropServices.ComVisible(false)] -[assembly: System.Runtime.Versioning.TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName=".NET Standard 2.1")] -namespace System.Linq -{ - public static class AsyncQueryable - { - public static System.Threading.Tasks.ValueTask AggregateAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> accumulator, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AggregateAsync(this System.Linq.IAsyncQueryable source, TAccumulate seed, System.Linq.Expressions.Expression> accumulator, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AggregateAsync(this System.Linq.IAsyncQueryable source, TAccumulate seed, System.Linq.Expressions.Expression> accumulator, System.Linq.Expressions.Expression> resultSelector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AggregateAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> accumulator, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AggregateAwaitAsync(this System.Linq.IAsyncQueryable source, TAccumulate seed, System.Linq.Expressions.Expression>> accumulator, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AggregateAwaitAsync(this System.Linq.IAsyncQueryable source, TAccumulate seed, System.Linq.Expressions.Expression>> accumulator, System.Linq.Expressions.Expression>> resultSelector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AggregateAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> accumulator, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AggregateAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, TAccumulate seed, System.Linq.Expressions.Expression>> accumulator, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AggregateAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, TAccumulate seed, System.Linq.Expressions.Expression>> accumulator, System.Linq.Expressions.Expression>> resultSelector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AllAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AllAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AllAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AnyAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AnyAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AnyAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AnyAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Linq.IAsyncQueryable Append(this System.Linq.IAsyncQueryable source, TSource element) { } - public static System.Linq.IAsyncQueryable AsAsyncQueryable(this System.Collections.Generic.IAsyncEnumerable source) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask AverageAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Linq.IAsyncQueryable Cast(this System.Linq.IAsyncQueryable source) { } - public static System.Linq.IAsyncQueryable Concat(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second) { } - public static System.Threading.Tasks.ValueTask ContainsAsync(this System.Linq.IAsyncQueryable source, TSource value, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask ContainsAsync(this System.Linq.IAsyncQueryable source, TSource value, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask CountAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask CountAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask CountAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask CountAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Linq.IAsyncQueryable DefaultIfEmpty(this System.Linq.IAsyncQueryable source) { } - public static System.Linq.IAsyncQueryable DefaultIfEmpty(this System.Linq.IAsyncQueryable source, TSource defaultValue) { } - public static System.Linq.IAsyncQueryable Distinct(this System.Linq.IAsyncQueryable source) { } - public static System.Linq.IAsyncQueryable Distinct(this System.Linq.IAsyncQueryable source, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Threading.Tasks.ValueTask ElementAtAsync(this System.Linq.IAsyncQueryable source, int index, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask ElementAtOrDefaultAsync(this System.Linq.IAsyncQueryable source, int index, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Linq.IAsyncQueryable Except(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second) { } - public static System.Linq.IAsyncQueryable Except(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Threading.Tasks.ValueTask FirstAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask FirstAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask FirstAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask FirstAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask FirstOrDefaultAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask FirstOrDefaultAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask FirstOrDefaultAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask FirstOrDefaultAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Linq.IAsyncQueryable> GroupBy(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector) { } - public static System.Linq.IAsyncQueryable> GroupBy(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Linq.IAsyncQueryable> GroupBy(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression> elementSelector) { } - public static System.Linq.IAsyncQueryable GroupBy(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression, TResult>> resultSelector) { } - public static System.Linq.IAsyncQueryable> GroupBy(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression> elementSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Linq.IAsyncQueryable GroupBy(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression, TResult>> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Linq.IAsyncQueryable GroupBy(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression> elementSelector, System.Linq.Expressions.Expression, TResult>> resultSelector) { } - public static System.Linq.IAsyncQueryable GroupBy(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression> elementSelector, System.Linq.Expressions.Expression, TResult>> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Linq.IAsyncQueryable> GroupByAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector) { } - public static System.Linq.IAsyncQueryable> GroupByAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Linq.IAsyncQueryable> GroupByAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector) { } - public static System.Linq.IAsyncQueryable GroupByAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression, System.Threading.Tasks.ValueTask>> resultSelector) { } - public static System.Linq.IAsyncQueryable> GroupByAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Linq.IAsyncQueryable GroupByAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression, System.Threading.Tasks.ValueTask>> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Linq.IAsyncQueryable GroupByAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector, System.Linq.Expressions.Expression, System.Threading.Tasks.ValueTask>> resultSelector) { } - public static System.Linq.IAsyncQueryable GroupByAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector, System.Linq.Expressions.Expression, System.Threading.Tasks.ValueTask>> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Linq.IAsyncQueryable> GroupByAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector) { } - public static System.Linq.IAsyncQueryable> GroupByAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Linq.IAsyncQueryable> GroupByAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector) { } - public static System.Linq.IAsyncQueryable GroupByAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask>> resultSelector) { } - public static System.Linq.IAsyncQueryable> GroupByAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Linq.IAsyncQueryable GroupByAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask>> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Linq.IAsyncQueryable GroupByAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector, System.Linq.Expressions.Expression, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask>> resultSelector) { } - public static System.Linq.IAsyncQueryable GroupByAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector, System.Linq.Expressions.Expression, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask>> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Linq.IAsyncQueryable GroupJoin(this System.Linq.IAsyncQueryable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Linq.Expressions.Expression> outerKeySelector, System.Linq.Expressions.Expression> innerKeySelector, System.Linq.Expressions.Expression, TResult>> resultSelector) { } - public static System.Linq.IAsyncQueryable GroupJoin(this System.Linq.IAsyncQueryable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Linq.Expressions.Expression> outerKeySelector, System.Linq.Expressions.Expression> innerKeySelector, System.Linq.Expressions.Expression, TResult>> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Linq.IAsyncQueryable GroupJoinAwait(this System.Linq.IAsyncQueryable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Linq.Expressions.Expression>> outerKeySelector, System.Linq.Expressions.Expression>> innerKeySelector, System.Linq.Expressions.Expression, System.Threading.Tasks.ValueTask>> resultSelector) { } - public static System.Linq.IAsyncQueryable GroupJoinAwait(this System.Linq.IAsyncQueryable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Linq.Expressions.Expression>> outerKeySelector, System.Linq.Expressions.Expression>> innerKeySelector, System.Linq.Expressions.Expression, System.Threading.Tasks.ValueTask>> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Linq.IAsyncQueryable GroupJoinAwaitWithCancellation(this System.Linq.IAsyncQueryable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Linq.Expressions.Expression>> outerKeySelector, System.Linq.Expressions.Expression>> innerKeySelector, System.Linq.Expressions.Expression, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask>> resultSelector) { } - public static System.Linq.IAsyncQueryable GroupJoinAwaitWithCancellation(this System.Linq.IAsyncQueryable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Linq.Expressions.Expression>> outerKeySelector, System.Linq.Expressions.Expression>> innerKeySelector, System.Linq.Expressions.Expression, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask>> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Linq.IAsyncQueryable Intersect(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second) { } - public static System.Linq.IAsyncQueryable Intersect(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Linq.IAsyncQueryable Join(this System.Linq.IAsyncQueryable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Linq.Expressions.Expression> outerKeySelector, System.Linq.Expressions.Expression> innerKeySelector, System.Linq.Expressions.Expression> resultSelector) { } - public static System.Linq.IAsyncQueryable Join(this System.Linq.IAsyncQueryable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Linq.Expressions.Expression> outerKeySelector, System.Linq.Expressions.Expression> innerKeySelector, System.Linq.Expressions.Expression> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Linq.IAsyncQueryable JoinAwait(this System.Linq.IAsyncQueryable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Linq.Expressions.Expression>> outerKeySelector, System.Linq.Expressions.Expression>> innerKeySelector, System.Linq.Expressions.Expression>> resultSelector) { } - public static System.Linq.IAsyncQueryable JoinAwait(this System.Linq.IAsyncQueryable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Linq.Expressions.Expression>> outerKeySelector, System.Linq.Expressions.Expression>> innerKeySelector, System.Linq.Expressions.Expression>> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Linq.IAsyncQueryable JoinAwaitWithCancellation(this System.Linq.IAsyncQueryable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Linq.Expressions.Expression>> outerKeySelector, System.Linq.Expressions.Expression>> innerKeySelector, System.Linq.Expressions.Expression>> resultSelector) { } - public static System.Linq.IAsyncQueryable JoinAwaitWithCancellation(this System.Linq.IAsyncQueryable outer, System.Collections.Generic.IAsyncEnumerable inner, System.Linq.Expressions.Expression>> outerKeySelector, System.Linq.Expressions.Expression>> innerKeySelector, System.Linq.Expressions.Expression>> resultSelector, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Threading.Tasks.ValueTask LastAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask LastAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask LastAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask LastAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask LastOrDefaultAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask LastOrDefaultAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask LastOrDefaultAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask LastOrDefaultAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask LongCountAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask LongCountAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask LongCountAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask LongCountAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MaxAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask MinAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Linq.IAsyncQueryable OfType(this System.Linq.IAsyncQueryable source) { } - public static System.Linq.IOrderedAsyncQueryable OrderBy(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector) { } - public static System.Linq.IOrderedAsyncQueryable OrderBy(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IComparer? comparer) { } - public static System.Linq.IOrderedAsyncQueryable OrderByAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector) { } - public static System.Linq.IOrderedAsyncQueryable OrderByAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IComparer? comparer) { } - public static System.Linq.IOrderedAsyncQueryable OrderByAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector) { } - public static System.Linq.IOrderedAsyncQueryable OrderByAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IComparer? comparer) { } - public static System.Linq.IOrderedAsyncQueryable OrderByDescending(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector) { } - public static System.Linq.IOrderedAsyncQueryable OrderByDescending(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IComparer? comparer) { } - public static System.Linq.IOrderedAsyncQueryable OrderByDescendingAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector) { } - public static System.Linq.IOrderedAsyncQueryable OrderByDescendingAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IComparer? comparer) { } - public static System.Linq.IOrderedAsyncQueryable OrderByDescendingAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector) { } - public static System.Linq.IOrderedAsyncQueryable OrderByDescendingAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IComparer? comparer) { } - public static System.Linq.IAsyncQueryable Prepend(this System.Linq.IAsyncQueryable source, TSource element) { } - public static System.Linq.IAsyncQueryable Reverse(this System.Linq.IAsyncQueryable source) { } - public static System.Linq.IAsyncQueryable Select(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector) { } - public static System.Linq.IAsyncQueryable Select(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector) { } - public static System.Linq.IAsyncQueryable SelectAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector) { } - public static System.Linq.IAsyncQueryable SelectAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector) { } - public static System.Linq.IAsyncQueryable SelectAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector) { } - public static System.Linq.IAsyncQueryable SelectAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector) { } - public static System.Linq.IAsyncQueryable SelectMany(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector) { } - public static System.Linq.IAsyncQueryable SelectMany(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector) { } - public static System.Linq.IAsyncQueryable SelectMany(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> collectionSelector, System.Linq.Expressions.Expression> resultSelector) { } - public static System.Linq.IAsyncQueryable SelectMany(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> collectionSelector, System.Linq.Expressions.Expression> resultSelector) { } - public static System.Linq.IAsyncQueryable SelectManyAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>>> selector) { } - public static System.Linq.IAsyncQueryable SelectManyAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>>> selector) { } - public static System.Linq.IAsyncQueryable SelectManyAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>>> collectionSelector, System.Linq.Expressions.Expression>> resultSelector) { } - public static System.Linq.IAsyncQueryable SelectManyAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>>> collectionSelector, System.Linq.Expressions.Expression>> resultSelector) { } - public static System.Linq.IAsyncQueryable SelectManyAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>>> selector) { } - public static System.Linq.IAsyncQueryable SelectManyAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>>> selector) { } - public static System.Linq.IAsyncQueryable SelectManyAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>>> collectionSelector, System.Linq.Expressions.Expression>> resultSelector) { } - public static System.Linq.IAsyncQueryable SelectManyAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>>> collectionSelector, System.Linq.Expressions.Expression>> resultSelector) { } - public static System.Threading.Tasks.ValueTask SequenceEqualAsync(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SequenceEqualAsync(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SingleAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SingleAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SingleAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SingleAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SingleOrDefaultAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SingleOrDefaultAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SingleOrDefaultAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SingleOrDefaultAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Linq.IAsyncQueryable Skip(this System.Linq.IAsyncQueryable source, int count) { } - public static System.Linq.IAsyncQueryable SkipLast(this System.Linq.IAsyncQueryable source, int count) { } - public static System.Linq.IAsyncQueryable SkipWhile(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate) { } - public static System.Linq.IAsyncQueryable SkipWhile(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate) { } - public static System.Linq.IAsyncQueryable SkipWhileAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate) { } - public static System.Linq.IAsyncQueryable SkipWhileAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate) { } - public static System.Linq.IAsyncQueryable SkipWhileAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate) { } - public static System.Linq.IAsyncQueryable SkipWhileAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask SumAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> selector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Linq.IAsyncQueryable Take(this System.Linq.IAsyncQueryable source, int count) { } - public static System.Linq.IAsyncQueryable TakeLast(this System.Linq.IAsyncQueryable source, int count) { } - public static System.Linq.IAsyncQueryable TakeWhile(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate) { } - public static System.Linq.IAsyncQueryable TakeWhile(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate) { } - public static System.Linq.IAsyncQueryable TakeWhileAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate) { } - public static System.Linq.IAsyncQueryable TakeWhileAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate) { } - public static System.Linq.IAsyncQueryable TakeWhileAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate) { } - public static System.Linq.IAsyncQueryable TakeWhileAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate) { } - public static System.Linq.IOrderedAsyncQueryable ThenBy(this System.Linq.IOrderedAsyncQueryable source, System.Linq.Expressions.Expression> keySelector) { } - public static System.Linq.IOrderedAsyncQueryable ThenBy(this System.Linq.IOrderedAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IComparer? comparer) { } - public static System.Linq.IOrderedAsyncQueryable ThenByAwait(this System.Linq.IOrderedAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector) { } - public static System.Linq.IOrderedAsyncQueryable ThenByAwait(this System.Linq.IOrderedAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IComparer? comparer) { } - public static System.Linq.IOrderedAsyncQueryable ThenByAwaitWithCancellation(this System.Linq.IOrderedAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector) { } - public static System.Linq.IOrderedAsyncQueryable ThenByAwaitWithCancellation(this System.Linq.IOrderedAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IComparer? comparer) { } - public static System.Linq.IOrderedAsyncQueryable ThenByDescending(this System.Linq.IOrderedAsyncQueryable source, System.Linq.Expressions.Expression> keySelector) { } - public static System.Linq.IOrderedAsyncQueryable ThenByDescending(this System.Linq.IOrderedAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IComparer? comparer) { } - public static System.Linq.IOrderedAsyncQueryable ThenByDescendingAwait(this System.Linq.IOrderedAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector) { } - public static System.Linq.IOrderedAsyncQueryable ThenByDescendingAwait(this System.Linq.IOrderedAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IComparer? comparer) { } - public static System.Linq.IOrderedAsyncQueryable ThenByDescendingAwaitWithCancellation(this System.Linq.IOrderedAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector) { } - public static System.Linq.IOrderedAsyncQueryable ThenByDescendingAwaitWithCancellation(this System.Linq.IOrderedAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IComparer? comparer) { } - public static System.Threading.Tasks.ValueTask ToArrayAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToDictionaryAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Threading.CancellationToken cancellationToken = default) - where TKey : notnull { } - public static System.Threading.Tasks.ValueTask> ToDictionaryAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) - where TKey : notnull { } - public static System.Threading.Tasks.ValueTask> ToDictionaryAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression> elementSelector, System.Threading.CancellationToken cancellationToken = default) - where TKey : notnull { } - public static System.Threading.Tasks.ValueTask> ToDictionaryAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression> elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) - where TKey : notnull { } - public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Threading.CancellationToken cancellationToken = default) - where TKey : notnull { } - public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) - where TKey : notnull { } - public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector, System.Threading.CancellationToken cancellationToken = default) - where TKey : notnull { } - public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) - where TKey : notnull { } - public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Threading.CancellationToken cancellationToken = default) - where TKey : notnull { } - public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) - where TKey : notnull { } - public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector, System.Threading.CancellationToken cancellationToken = default) - where TKey : notnull { } - public static System.Threading.Tasks.ValueTask> ToDictionaryAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) - where TKey : notnull { } - public static System.Threading.Tasks.ValueTask> ToHashSetAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToHashSetAsync(this System.Linq.IAsyncQueryable source, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToListAsync(this System.Linq.IAsyncQueryable source, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToLookupAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToLookupAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToLookupAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression> elementSelector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToLookupAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression> elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToLookupAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToLookupAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToLookupAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToLookupAwaitAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToLookupAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToLookupAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToLookupAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.ValueTask> ToLookupAwaitWithCancellationAsync(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> keySelector, System.Linq.Expressions.Expression>> elementSelector, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Linq.IAsyncQueryable Union(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second) { } - public static System.Linq.IAsyncQueryable Union(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second, System.Collections.Generic.IEqualityComparer? comparer) { } - public static System.Linq.IAsyncQueryable Where(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate) { } - public static System.Linq.IAsyncQueryable Where(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression> predicate) { } - public static System.Linq.IAsyncQueryable WhereAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate) { } - public static System.Linq.IAsyncQueryable WhereAwait(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate) { } - public static System.Linq.IAsyncQueryable WhereAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate) { } - public static System.Linq.IAsyncQueryable WhereAwaitWithCancellation(this System.Linq.IAsyncQueryable source, System.Linq.Expressions.Expression>> predicate) { } - public static System.Linq.IAsyncQueryable> Zip(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second) { } - public static System.Linq.IAsyncQueryable Zip(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second, System.Linq.Expressions.Expression> selector) { } - public static System.Linq.IAsyncQueryable ZipAwait(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second, System.Linq.Expressions.Expression>> selector) { } - public static System.Linq.IAsyncQueryable ZipAwaitWithCancellation(this System.Linq.IAsyncQueryable first, System.Collections.Generic.IAsyncEnumerable second, System.Linq.Expressions.Expression>> selector) { } - } - public interface IAsyncQueryProvider - { - System.Linq.IAsyncQueryable CreateQuery(System.Linq.Expressions.Expression expression); - System.Threading.Tasks.ValueTask ExecuteAsync(System.Linq.Expressions.Expression expression, System.Threading.CancellationToken token); - } - public interface IAsyncQueryable - { - System.Type ElementType { get; } - System.Linq.Expressions.Expression Expression { get; } - System.Linq.IAsyncQueryProvider Provider { get; } - } - public interface IAsyncQueryable : System.Collections.Generic.IAsyncEnumerable, System.Linq.IAsyncQueryable { } - public interface IOrderedAsyncQueryable : System.Linq.IAsyncQueryable { } - public interface IOrderedAsyncQueryable : System.Collections.Generic.IAsyncEnumerable, System.Linq.IAsyncQueryable, System.Linq.IAsyncQueryable, System.Linq.IOrderedAsyncQueryable { } - [System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=false)] - public sealed class LocalQueryMethodImplementationTypeAttribute : System.Attribute - { - public LocalQueryMethodImplementationTypeAttribute(System.Type targetType) { } - public System.Type TargetType { get; } - } -} \ No newline at end of file diff --git a/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemLinqAsyncQueryable.verified.cs b/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemLinqAsyncQueryable.verified.cs index ef82c6d2c..33196b616 100644 --- a/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemLinqAsyncQueryable.verified.cs +++ b/Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemLinqAsyncQueryable.verified.cs @@ -1,7 +1,7 @@ [assembly: System.CLSCompliant(true)] [assembly: System.Resources.NeutralResourcesLanguage("en-US")] [assembly: System.Runtime.InteropServices.ComVisible(false)] -[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName=".NET 6.0")] +[assembly: System.Runtime.Versioning.TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName=".NET Standard 2.1")] namespace System.Linq { public static class AsyncQueryable From 840f3e689fba685f3f991ad06b9b4f836d46f8e5 Mon Sep 17 00:00:00 2001 From: Ian Griffiths Date: Tue, 30 Sep 2025 16:19:27 +0100 Subject: [PATCH 09/10] Align ref and lib target frameworks --- .../System.Interactive.Providers.csproj | 6 ++---- .../System.Interactive.Tests.csproj | 2 +- Ix.NET/Source/System.Interactive/System.Interactive.csproj | 6 ++---- .../System.Interactive.Providers.csproj | 2 +- .../refs/System.Interactive/System.Interactive.csproj | 2 +- .../Source/refs/System.Linq.Async/System.Linq.Async.csproj | 2 +- 6 files changed, 8 insertions(+), 12 deletions(-) diff --git a/Ix.NET/Source/System.Interactive.Providers/System.Interactive.Providers.csproj b/Ix.NET/Source/System.Interactive.Providers/System.Interactive.Providers.csproj index 09eba524d..6042eb1b5 100644 --- a/Ix.NET/Source/System.Interactive.Providers/System.Interactive.Providers.csproj +++ b/Ix.NET/Source/System.Interactive.Providers/System.Interactive.Providers.csproj @@ -3,7 +3,7 @@ Interactive Extensions Providers Library used to build query providers and express queries over enumerable sequences. Interactive Extensions - Providers Library - net48;netstandard2.0;net6.0 + net48;netstandard2.0;net8.0 Ix;Interactive;Extensions;Enumerable @@ -21,9 +21,7 @@ See ../../Documentation/adr/0001-Ix-Ref-Assembly-Mismatches.md --> - + - + - net48;netstandard2.1;net6.0 + net48;netstandard2.1;net8.0 Ix;Interactive;Extensions;Enumerable diff --git a/Ix.NET/Source/refs/System.Interactive/System.Interactive.csproj b/Ix.NET/Source/refs/System.Interactive/System.Interactive.csproj index 47d0858a4..64ae74938 100644 --- a/Ix.NET/Source/refs/System.Interactive/System.Interactive.csproj +++ b/Ix.NET/Source/refs/System.Interactive/System.Interactive.csproj @@ -12,7 +12,7 @@ See ../../Documentation/adr/0001-Ix-Ref-Assembly-Mismatches.md --> - net48;netstandard2.1;net6.0 + net48;netstandard2.1;net8.0 Ix;Interactive;Extensions;Enumerable diff --git a/Ix.NET/Source/refs/System.Linq.Async/System.Linq.Async.csproj b/Ix.NET/Source/refs/System.Linq.Async/System.Linq.Async.csproj index 24ad29b46..6c4f969fb 100644 --- a/Ix.NET/Source/refs/System.Linq.Async/System.Linq.Async.csproj +++ b/Ix.NET/Source/refs/System.Linq.Async/System.Linq.Async.csproj @@ -6,7 +6,7 @@ LINQ Standard Query Operators used to express queries over asynchronous enumerable sequences. System.Linq.Async Microsoft - net48;netstandard2.0;netstandard2.1;net10.0 + net48;netstandard2.0;netstandard2.1;net8.0 Enumerable;Asynchronous;LINQ System.Linq.Async From 24680b546910a31c77680e83cb7f62fe71c244f0 Mon Sep 17 00:00:00 2001 From: Ian Griffiths Date: Tue, 30 Sep 2025 16:40:05 +0100 Subject: [PATCH 10/10] Update version to v7.0 --- Ix.NET/Source/version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ix.NET/Source/version.json b/Ix.NET/Source/version.json index 98c407497..9dd54b7ec 100644 --- a/Ix.NET/Source/version.json +++ b/Ix.NET/Source/version.json @@ -1,5 +1,5 @@ { - "version": "6.1.0-preview.{height}", + "version": "7.0.0-preview.{height}", "publicReleaseRefSpec": [ "^refs/heads/main$", // we release out of main "^refs/heads/rel/v\\d+\\.\\d+", // we also release branches starting with vN.N