Microsoft.Bcl.AsyncInterfaces 9.0.0-preview.4.24266.19

About

As of C# 8, the C# language has support for producing and consuming asynchronous iterators. The library types in support of those features are available in .NET Core 3.0 and newer as well as in .NET Standard 2.1. This library provides the necessary definitions of those types to support these language features on .NET Framework and on .NET Standard 2.0. This library is not necessary nor recommended when targeting versions of .NET that include the relevant support.

Key Features

  • Enables the use of C# async iterators on older .NET platforms

How to Use

using System;
using System.Collections.Generic;
using System.Threading.Tasks;

internal static class Program
{
    private static async Task Main()
    {
        Console.WriteLine("Starting...");
        await foreach (var value in GetValuesAsync())
        {
            Console.WriteLine(value);
        }
        Console.WriteLine("Finished!");

        static async IAsyncEnumerable<int> GetValuesAsync()
        {
            for (int i = 0; i < 10; i++)
            {
                await Task.Delay(TimeSpan.FromSeconds(1));
                yield return i;
            }
        }
    }
}

Main Types

The main types provided by this library are:

  • IAsyncEnumerable<T>
  • IAsyncEnumerator<T>
  • IAsyncDisposable<T>

Additional Documentation

Feedback & Contributing

Microsoft.Bcl.AsyncInterfaces is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Showing the top 20 packages that depend on Microsoft.Bcl.AsyncInterfaces.

Packages Downloads
StackExchange.Redis
High performance Redis client, incorporating both synchronous and asynchronous usage.
70
Microsoft.Extensions.DependencyInjection
Default implementation of dependency injection for Microsoft.Extensions.DependencyInjection.
48
Autofac
Autofac is an IoC container for Microsoft .NET. It manages the dependencies between classes so that applications stay easy to change as they grow in size and complexity.
45
Microsoft.Extensions.DependencyInjection
Default implementation of dependency injection for Microsoft.Extensions.DependencyInjection.
36
Autofac
Autofac is an IoC container for Microsoft .NET. It manages the dependencies between classes so that applications stay easy to change as they grow in size and complexity.
33
FirebirdSql.Data.FirebirdClient
Firebird ADO.NET data provider
29
Microsoft.Extensions.Logging.Console
Console logger provider implementation for Microsoft.Extensions.Logging.
27
Stripe.net
Stripe.net is a sync/async .NET 4.6.1+ client, and a portable class library for the Stripe API. (Official Library)
27
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
27
Microsoft.Extensions.DependencyInjection.Abstractions
Abstractions for dependency injection. Commonly Used Types: Microsoft.Extensions.DependencyInjection.IServiceCollection
26
Stripe.net
Stripe.net is a sync/async .NET 4.6.1+ client, and a portable class library for the Stripe API. (Official Library)
26
Microsoft.Extensions.DependencyInjection.Abstractions
Abstractions for dependency injection. Commonly Used Types: Microsoft.Extensions.DependencyInjection.IServiceCollection
25
Microsoft.EntityFrameworkCore
Entity Framework Core is a lightweight and extensible version of the popular Entity Framework data access technology. Commonly Used Types: Microsoft.EntityFrameworkCore.DbContext Microsoft.EntityFrameworkCore.DbSet
25
Microsoft.Extensions.Logging
Logging infrastructure default implementation for Microsoft.Extensions.Logging.
25
Microsoft.Extensions.DependencyInjection
Default implementation of dependency injection for Microsoft.Extensions.DependencyInjection.
25
System.Private.ServiceModel
Package Description
25
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
25
Microsoft.VisualStudio.Threading
Async synchronization primitives, async collections, TPL and dataflow extensions. The JoinableTaskFactory allows synchronously blocking the UI thread for async work. This package is applicable to any .NET application (not just Visual Studio).
25

https://go.microsoft.com/fwlink/?LinkID=799421

.NET Framework 4.6.2

.NET Standard 2.0

.NET Standard 2.1

  • No dependencies.

Version Downloads Last updated
10.0.0-preview.3.25171.5 1 4/15/2025
10.0.0-preview.2.25163.2 1 4/16/2025
10.0.0-preview.1.25080.5 5 2/27/2025
9.0.4 1 4/16/2025
9.0.3 3 3/12/2025
9.0.2 6 2/20/2025
9.0.1 9 2/4/2025
9.0.0 7 12/15/2024
9.0.0-rc.2.24473.5 4 12/16/2024
9.0.0-rc.1.24431.7 12 9/13/2024
9.0.0-preview.7.24405.7 13 8/16/2024
9.0.0-preview.6.24327.7 17 7/18/2024
9.0.0-preview.5.24306.7 14 7/11/2024
9.0.0-preview.4.24266.19 14 8/2/2024
9.0.0-preview.3.24172.9 17 4/17/2024
9.0.0-preview.2.24128.5 17 4/24/2024
9.0.0-preview.1.24080.9 16 3/7/2024
8.0.0 18 3/5/2024
8.0.0-rc.2.23479.6 19 3/7/2024
8.0.0-rc.1.23419.4 21 3/7/2024
8.0.0-preview.7.23375.6 22 3/7/2024
8.0.0-preview.6.23329.7 18 3/7/2024
8.0.0-preview.5.23280.8 18 7/2/2023
8.0.0-preview.4.23259.5 16 3/7/2024
8.0.0-preview.3.23174.8 19 3/7/2024
8.0.0-preview.2.23128.3 20 3/7/2024
8.0.0-preview.1.23110.8 21 3/7/2024
7.0.0 21 3/5/2024
7.0.0-rc.2.22472.3 16 3/7/2024
7.0.0-rc.1.22426.10 16 3/7/2024
7.0.0-preview.7.22375.6 17 3/7/2024
7.0.0-preview.6.22324.4 21 3/7/2024
7.0.0-preview.5.22301.12 20 3/7/2024
7.0.0-preview.4.22229.4 17 3/7/2024
7.0.0-preview.3.22175.4 18 3/7/2024
7.0.0-preview.2.22152.2 20 3/7/2024
7.0.0-preview.1.22076.8 14 3/7/2024
6.0.2-mauipre.1.22102.15 20 3/7/2024
6.0.2-mauipre.1.22054.8 20 3/7/2024
6.0.0 21 3/5/2024
6.0.0-rc.2.21480.5 19 3/7/2024
6.0.0-rc.1.21451.13 13 3/7/2024
6.0.0-preview.7.21377.19 19 3/7/2024
6.0.0-preview.6.21352.12 23 3/7/2024
6.0.0-preview.5.21301.5 20 3/7/2024
6.0.0-preview.4.21253.7 16 3/7/2024
6.0.0-preview.3.21201.4 15 3/7/2024
6.0.0-preview.2.21154.6 18 3/7/2024
6.0.0-preview.1.21102.12 19 3/7/2024
5.0.0 19 4/12/2022
5.0.0-rc.2.20475.5 17 3/7/2024
5.0.0-rc.1.20451.14 16 3/7/2024
1.1.1 21 4/12/2022
1.1.0 15 4/12/2022
1.1.0-preview3.19551.4 18 3/7/2024
1.1.0-preview2.19523.17 18 3/7/2024
1.1.0-preview1.19504.10 18 3/7/2024
1.0.0 17 3/5/2024
1.0.0-rc1.19456.4 17 3/7/2024
1.0.0-preview9.19421.4 19 3/7/2024
1.0.0-preview9.19416.11 16 3/7/2024
1.0.0-preview8.19405.3 18 3/7/2024
1.0.0-preview7.19362.9 19 3/7/2024
1.0.0-preview6.19303.8 15 3/7/2024
1.0.0-preview6.19264.9 21 3/7/2024
1.0.0-preview6.19259.10 20 3/7/2024