CSharp8Beta.AsyncIteratorPrerequisites.Unofficial
1.1.0
dotnet add package CSharp8Beta.AsyncIteratorPrerequisites.Unofficial --version 1.1.0
NuGet\Install-Package CSharp8Beta.AsyncIteratorPrerequisites.Unofficial -Version 1.1.0
<PackageReference Include="CSharp8Beta.AsyncIteratorPrerequisites.Unofficial" Version="1.1.0" />
<PackageVersion Include="CSharp8Beta.AsyncIteratorPrerequisites.Unofficial" Version="1.1.0" />
<PackageReference Include="CSharp8Beta.AsyncIteratorPrerequisites.Unofficial" />
paket add CSharp8Beta.AsyncIteratorPrerequisites.Unofficial --version 1.1.0
#r "nuget: CSharp8Beta.AsyncIteratorPrerequisites.Unofficial, 1.1.0"
#:package CSharp8Beta.AsyncIteratorPrerequisites.Unofficial@1.1.0
#addin nuget:?package=CSharp8Beta.AsyncIteratorPrerequisites.Unofficial&version=1.1.0
#tool nuget:?package=CSharp8Beta.AsyncIteratorPrerequisites.Unofficial&version=1.1.0
This package was not created by Microsoft but the source code used to compile the assembly contained within it was written by Microsoft employees.
I hope I haven't caused any drama or broken any laws, but when C# 8 Beta was released alongside Visual Studio 2019 Preview 1, on the December 4th 2018, writing async iterators and consuming them wasn't possible even though it could have been. The compiler was missing two types: ManualResetValueTaskSourceLogic<T> and IStrongBox<T> which I found here: https://gist.github.com/jcouv/ae7800985e3a8700bb84c6650d25bb69 and put in this nuget package within their designated namespaces. Adding this nuget package will allow you to use C# 8 Beta and write async iterators (methods which generate IAsyncEnumerable<T>).
Furthermore the bug around enumerators ending after two iterations if you're inside an async iterator method can be resolved by turning your foreach statement into an await foreach statement and applying the thin wrapper .ToAsync() on the target enumerable (which will only allocate 2 class instances, one for the call itself and one for the enumeration itself).
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp3.0 is compatible. netcoreapp3.1 was computed. |
-
.NETCoreApp 3.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.