Preparing for System.Linq.AsyncEnumerable #2240
Draft
+2,945
−256
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
.NET 10 includes
System.Linq.AsyncEnumerable
(and this is available for older .NET runtimes as a NuGet package). This provides LINQ forIAsyncEnumerable<T>
, which is the primary raison d'être of theSystem.Linq.Async
package that is built as part of Ix.NET.The current version of
System.Linq.Async
(v6) causes problems if you use it in a project whereSystem.Linq.AsyncEnumerable
is also in use (e.g., any .NET 10.0 project).This modifies
System.Linq.Async
to enable it to coexist withSystem.Linq.AsyncEnumerable
(by removing most of the functionality from the public API visible in its ref assemblies, while leaving everything present in the runtime assemblies for binary compatibility). The small amount of functionality inSystem.Linq.Async
that has not been recreated inSystem.Linq.AsyncEnumerable
moves intoSystem.Interactive.Async
. The goal is for projects to be able to removeSystem.Linq.Async
, and for us to deprecate this package.The various oddly-named overloads that take async callbacks (with suffixes such as
Await
andWithCancellation
) remain but have been marked as[Obsolete]
with messages recommending that the developer move over to their more conventionally named equivalents fromSystem.Linq.AsyncEnumerable
.