VOOZH about

URL: https://www.nuget.org/packages/Open.ChannelExtensions/

⇱ NuGet Gallery | Open.ChannelExtensions 9.3.0




👁 Image
Open.ChannelExtensions 9.3.0

dotnet add package Open.ChannelExtensions --version 9.3.0
 
 
NuGet\Install-Package Open.ChannelExtensions -Version 9.3.0
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Open.ChannelExtensions" Version="9.3.0" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Open.ChannelExtensions" Version="9.3.0" />
 
Directory.Packages.props
<PackageReference Include="Open.ChannelExtensions" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Open.ChannelExtensions --version 9.3.0
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Open.ChannelExtensions, 9.3.0"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Open.ChannelExtensions@9.3.0
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Open.ChannelExtensions&version=9.3.0
 
Install as a Cake Addin
#tool nuget:?package=Open.ChannelExtensions&version=9.3.0
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Open.ChannelExtensions

👁 NuGet

A set of extensions for optimizing/simplifying System.Threading.Channels usage.

Click here for detailed documentation.

Highlights

Read & Write

With optional concurrency levels.

  • Reading all entries in a channel.
  • Writing all entries from a source to a channel.
  • Piping (consuming) all entries to a buffer (channel).
  • .AsAsyncEnumerable() (IAsyncEnumerable) support for .NET Standard 2.1+ and .NET Core 3+

Special ChannelReader Operations

  • Filter: reads from the channel until a match is found.
  • Transform: applies a transform function upon successfully reading an item from the channel.
  • Batch: attempts to group items into a List<T> (or a Queue<T>) before being available for reading.
  • Join: combines batches into a single channel.

Installation

Install-Package Open.ChannelExtensions

Examples

Being able to define an asynchronous pipeline with best practice usage using simple expressive syntax:

await Channel
 .CreateBounded<T>(10)
 .SourceAsync(source /* IEnumerable<Task<T>> */)
 .PipeAsync(
 maxConcurrency: 2,
 capacity: 5,
 transform: asyncTransform01)
 .Pipe(transform02, /* capacity */ 3)
 .ReadAllAsync(finalTransformedValue => {
 // Do something async with each final value.
 });
await source /* IEnumerable<T> */
 .ToChannel(boundedSize: 10, singleReader: true)
 .PipeAsync(asyncTransform01, /* capacity */ 5)
 .Pipe(
 maxConcurrency: 2,
 capacity: 3,
 transform: transform02)
 .ReadAll(finalTransformedValue => {
 // Do something with each final value.
 });

Reading (until the channel is closed)

One by one read each entry from the channel
await channel.ReadAll(
 entry => { /* Processing Code */ });
await channel.ReadAll(
 (entry, index) => { /* Processing Code */ });
await channel.ReadAllAsync(
 async entry => { await /* Processing Code */ });
await channel.ReadAllAsync(
 async (entry, index) => { await /* Processing Code */ });
Read concurrently each entry from the channel
await channel.ReadAllConcurrently(
 maxConcurrency,
 entry => { /* Processing Code */ });
await channel.ReadAllConcurrentlyAsync(
 maxConcurrency,
 async entry => { await /* Processing Code */ });

Writing

If complete is true, the channel will be closed when the source is empty.

Dump a source enumeration into the channel
// source can be any IEnumerable<T>.
await channel.WriteAll(source, complete: true);
// source can be any IEnumerable<Task<T>> or IEnumerable<ValueTask<T>>.
await channel.WriteAllAsync(source, complete: true);
Synchronize reading from the source and process the results concurrently
// source can be any IEnumerable<Task<T>> or IEnumerable<ValueTask<T>>.
await channel.WriteAllConcurrentlyAsync(
 maxConcurrency, source, complete: true);

Filter & Transform

Both of these extensions operate synchronously after an item is read from the channel.

Any predicate or selector function must trap errors of the downstream read will fail and data may not be recoverable.

// Filter and transform when reading.
channel.Reader
 .Filter(predicate) // .Where()
 .Transform(selector) // .Select()
 .ReadAllAsync(async value => {/*...*/});

Batching

values.Reader
 .Batch(10 /*batch size*/) // Groups into List<T>.
 .WithTimeout(1000) // Any non-empty batches are flushed every second.
 .ReadAllAsync(async batch => {/*...*/});

Joining

The inverse of batching.

batches.Reader
 .Join() // Combines the batches into a single channel.
 .ReadAllAsync(async value => {/*...*/});

Pipelining / Transforming

Transform and buffer entries
// Transform values in a source channel to new unbounded channel.
var transformed = channel.Pipe(
 async value => /* transformation */);
// Transform values in a source channel to new unbounded channel with a max concurrency of X.
const int X = 4;
var transformed = channel.Pipe(
 X, async value => /* transformation */);
// Transform values in a source channel to new bounded channel bound of N entries.
const int N = 5;
var transformed = channel.Pipe(
 async value => /* transformation */, N);
// Transform values in a source channel to new bounded channel bound of N entries with a max concurrency of X.
const int X = 4;
const int N = 5;
var transformed = channel.Pipe(
 X, async value => /* transformation */, N);

// or
transformed = channel.Pipe(
 maxConcurrency: X,
 capacity: N,
 transform: async value => /* transformation */);
Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 is compatible.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 is compatible.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp2.0 netcoreapp2.0 was computed.  netcoreapp2.1 netcoreapp2.1 was computed.  netcoreapp2.2 netcoreapp2.2 was computed.  netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 netstandard2.0 is compatible.  netstandard2.1 netstandard2.1 is compatible. 
.NET Framework net461 net461 was computed.  net462 net462 was computed.  net463 net463 was computed.  net47 net47 was computed.  net471 net471 was computed.  net472 net472 was computed.  net48 net48 was computed.  net481 net481 was computed. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen40 tizen40 was computed.  tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (11)

Showing the top 5 NuGet packages that depend on Open.ChannelExtensions:

Package Downloads
Indice.Features.Identity.SignInLogs

Package Description

Indice.Features.Messages.Core

Package Description

Open.Database.Extensions.Channel

Database extensions for pipelining data through channels. Includes Open.Database.Extensions.Core.

DataPipe.Core

Provides AWS support to the DataPipe platform. Reference this package if you need to read or write to S3 from a data pipe script

Open.ChannelExtensions.Kafka

Bridges Confluent.Kafka with System.Threading.Channels and Open.ChannelExtensions for resilient, back-pressure-aware Kafka producers and consumers.

GitHub repositories (3)

Showing the top 3 popular GitHub repositories that depend on Open.ChannelExtensions:

Repository Stars
oskardudycz/EventSourcing.NetCore
Examples and Tutorials of Event Sourcing in .NET
mehdihadeli/food-delivery-microservices
🍔 A practical and cloud-native food delivery microservices, built with .Net Aspire, .Net 9, MassTransit, Domain-Driven Design, CQRS, Vertical Slice Architecture, Event-Driven Architecture, and the latest technologies.
Excel-DNA/Samples
Various sample projects and snippets related to Excel-DNA
Version Downloads Last Updated
9.3.0 68,667 3/18/2026
9.2.0 6,196 3/17/2026
9.1.3 19,662 2/2/2026
9.1.2 453 1/31/2026
9.1.1 68,222 11/18/2025
9.1.0 224,934 4/11/2025
9.0.0 139,847 11/18/2024
8.6.0 30,122 11/13/2024
8.5.0 47,038 9/22/2024
8.4.3 112,104 7/8/2024
8.4.2 8,545 7/1/2024
8.4.1 2,930 6/26/2024
8.4.0 1,875 6/26/2024
8.3.0 108,043 5/7/2024
7.3.0 1,870 9/22/2024
7.2.0 1,877 7/8/2024
7.1.0 1,879 6/26/2024
6.6.0 1,922 9/22/2024
6.5.0 1,888 7/8/2024
6.4.0 1,880 6/26/2024
Loading failed

Lowered .NET Standard 2.0/2.1 dependency versions to 6.0.0 to reduce minimum requirements for consumers.