问题
When working with an IEnumerable<T> there are the build-in extension methods from the System.Linq namespace such as Skip, Where and Select to work with.
When Microsoft added IAsyncEnumerable in C#8 did they also add new Linq methods to support this?
I could of course implement these methods myself, or maybe find some package which does that, but I'd prefer to use a language-standard method if it exists.
回答1:
There is, in the System.Linq.Async namespace from the System.Reactive package. If you don't want the full System.Reactive package, you can use the System.Linq.Async package directly (it's part of System.Reactive).
You can read this github issue. The source for System.Linq.Async can be found here.
来源:https://stackoverflow.com/questions/58376585/linq-methods-for-iasyncenumerable