Open-NET-Libraries / Open.ChannelExtensions

A set of extensions for optimizing/simplifying System.Threading.Channels usage.
https://open-net-libraries.github.io/Open.ChannelExtensions/api/Open.ChannelExtensions.Extensions.html#methods
MIT License
401 stars 25 forks source link

Expose AsyncEnumerable on NETSTANDARD20 with dependency #45

Open adamhathcock opened 1 week ago

adamhathcock commented 1 week ago

Adds package for NET Standard 2.0 that allows for AsyncEnumerable usage

adamhathcock commented 1 week ago

This library helps greatly with Channels usage. Unfortunately, some of my use cases are for .NET Framework still. I hope this is accepted to stop me having to do the extension methods on my own.

electricessence commented 5 days ago

Did I miss somewhere that .NET Standard 2.0 supports IAsyncEnumerable? 2.1 does, and so does this library. If you need pseudo IAsyncEnumerable it does exist, but not in a form that the compiler outright understands. You can Use reader.ReadAllAsync(async e => { }) to do the same.

electricessence commented 5 days ago

I'll take a look at adding the Microsoft.Bcl dependency, but no promises.