Linq methods for IAsyncEnumerable

≡放荡痞女 提交于 2020-08-26 19:48:29

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!