Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linq methods for 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.

like image 381
GWigWam Avatar asked Oct 14 '19 12:10

GWigWam


1 Answers

LINQ for IAsyncEnumerable is supported by System.Linq.Async which is part of the reactive extensions for .NET. The reactive extensions as a whole are split into two larger NuGet packages: System.Reactive and System.Interactive.

While all the packages stayed the same, the extensions now live in the System.Linq namespace, not System.Linq.Async anymore (thanks Dzmitry Lahoda).

Relevant GitHub issue

like image 90
Joelius Avatar answered Oct 20 '22 07:10

Joelius