CounterpointCollective.Dataflow.Fluent
10.1.153
dotnet add package CounterpointCollective.Dataflow.Fluent --version 10.1.153
NuGet\Install-Package CounterpointCollective.Dataflow.Fluent -Version 10.1.153
<PackageReference Include="CounterpointCollective.Dataflow.Fluent" Version="10.1.153" />
<PackageVersion Include="CounterpointCollective.Dataflow.Fluent" Version="10.1.153" />
<PackageReference Include="CounterpointCollective.Dataflow.Fluent" />
paket add CounterpointCollective.Dataflow.Fluent --version 10.1.153
#r "nuget: CounterpointCollective.Dataflow.Fluent, 10.1.153"
#:package CounterpointCollective.Dataflow.Fluent@10.1.153
#addin nuget:?package=CounterpointCollective.Dataflow.Fluent&version=10.1.153
#tool nuget:?package=CounterpointCollective.Dataflow.Fluent&version=10.1.153
CounterpointCollective.Dataflow.Fluent
A modern fluent API for building TPL Dataflow pipelines in .NET
CounterpointCollective.Dataflow.Fluent provides a clean, readable, and composable API for TPL Dataflow.
Instead of manually creating blocks and linking them with repetitive boilerplate, you can build pipelines fluently, with full type safety and automatic PropagateCompletion.
This package wraps standard TPL Dataflow blocks in a fluent pipeline builder and provides extension methods for the most commonly used blocks.
Source & contributions: GitLab repository
Purpose
TPL Dataflow is powerful but verbose:
var startBlock = new BufferBlock<int>();
var t1 = new TransformBlock<int, int>(x => x + 1);
var t2 = new TransformBlock<int, int>(x => x * 2);
startBlock.LinkTo(t1, new DataflowLinkOptions { PropagateCompletion = true });
t1.LinkTo(t2, new DataflowLinkOptions { PropagateCompletion = true });
var myPipeline = DataflowBlock.Encapsulate(startBlock, t2);
As pipelines grow, the code can become cluttered and hard to maintain.
With the fluent API:
var myPipeline =
new BufferBlock<int>()
.Pipeline()
.Transform(i => i + 1)
.Transform(i => i * 2)
.Build();
Features
- Fluent creation of
BufferBlock,TransformBlock,TransformManyBlock,BatchBlock,ActionBlock, and more. - Type-safe pipeline composition:
IPipelineBuilder<TFirst, TLast>. - Easy linking with
LinkTo()and automaticPropagateCompletion. - Encapsulation of an entire pipeline as a single block (
IDataflowBlock,ISourceBlock<T>,ITargetBlock<TInput>, orIPropagatorBlock<TInput,TOutput>). - Selectors (
Select,SelectFirst,SelectLast) for transforming pipeline endpoints.
Contributing
Contributions are welcome! If you'd like to suggest improvements, report bugs, or contribute, please open an issue or submit a pull request.
- Fork the repo.
- Create your feature branch (
git checkout -b feature/MyFeature). - Commit your changes (
git commit -am 'Add new feature'). - Push to the branch (
git push origin feature/MyFeature). - Open a Merge Request.
License
Distributed under the MIT License. See LICENSE for more information.
Resources
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on CounterpointCollective.Dataflow.Fluent:
| Package | Downloads |
|---|---|
|
CounterpointCollective.Dataflow.Composable
Composable dataflow blocks for building robust, reusable data processing pipelines in .NET. |
GitHub repositories
This package is not used by any popular GitHub repositories.