IAsyncEnumerable的Linq方法

GWi*_*Wam 3 c# c#-8.0 iasyncenumerable

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.

Joe*_*ius 7

System.Linq.AsyncSystem.Reactive包的名称空间中。如果您不需要完整的System.Reactive软件包,则可以System.Linq.Async直接使用该软件包(是的一部分System.Reactive)。
您可以阅读github问题。的来源System.Linq.Async可以在这里找到。

  • 更新:“System.Linq.Async”现在似乎是一个单独的包:https://www.nuget.org/packages/System.Linq.Async (10认同)
  • 它已关闭,因为它已经在其他软件包中提供了,该软件包已经[在NuGet](https://www.nuget.org/packages/System.Linq.Async/)中可用。甚至LINQ都是一个“外部程序包”-它可以通过NuGet获得,但是您没有意识到,因为它作为几乎每个模板的依赖关系而下载 (2认同)