IAsyncEnumerable的Linq方法 [英] Linq methods for IAsyncEnumerable

查看:73
本文介绍了IAsyncEnumerable的Linq方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用 IEnumerable< T> 时,有 System.Linq 命名空间中的内置扩展方法,例如 Skip 在哪里选择一起使用.

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.

当Microsoft在C#8中添加 IAsyncEnumerable 时,他们是否还添加了新的Linq方法来支持此功能?

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.

推荐答案

System.Linq.Async 命名空间中,有 System.Linq.Async 包(它是 System.Reactive 的一部分).
您可以阅读此github问题.可以找到 System.Linq.Async 的源此处.

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.

这篇关于IAsyncEnumerable的Linq方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆