Skip to content

Is Use of the Microsoftl.Bcl.AsyncInterfaces Library Actually Supported? #81352

Discussion options

You must be logged in to vote

It's a bit complicated situation. First, given that Microsoft.Bcl.AsyncInterfaces still receives updates and targets .NET Framework, it should be supported fine. In fact, IAsyncEnumerable and IAsyncDisposable are just interfaces; there is nothing actual to support in them. They use ValueTask from the System.Tasks.Extensions package, which is supported on .NET Framework.

As for C# 8, it is not officially supported in earlier frameworks, but you can enable it at your own risk. I would do it if I were you and if the codebase is sufficiently tested, but if you don't want to do it, you can use IAsyncEnumerable from earlier language versions the manual way:

IAsyncEnumerable<int> xs = // …
// C#…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by jimn-purecars
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Answer questions and provide assistance, not an issue with source code or documentation. area-Meta untriaged New issue has not been triaged by the area owner
3 participants
Converted from issue

This discussion was converted from issue #81313 on January 30, 2023 12:46.