Hyperbee.Pipeline 3.0.0

dotnet add package Hyperbee.Pipeline --version 3.0.0
                    
NuGet\Install-Package Hyperbee.Pipeline -Version 3.0.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="Hyperbee.Pipeline" Version="3.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Hyperbee.Pipeline" Version="3.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Hyperbee.Pipeline" />
                    
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 Hyperbee.Pipeline --version 3.0.0
                    
#r "nuget: Hyperbee.Pipeline, 3.0.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 Hyperbee.Pipeline@3.0.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=Hyperbee.Pipeline&version=3.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Hyperbee.Pipeline&version=3.0.0
                    
Install as a Cake Tool

Hyperbee Pipeline

Hyperbee.Pipeline allows you to construct asynchronous fluent pipelines in .NET. A pipeline, in this context, refers to a sequence of data processing elements arranged in series, where the output of one element serves as the input for the subsequent element.

Hyperbee pipelines are composable, reusable, and easy to test. They are designed to be used in a variety of scenarios, such as data processing, message handling, and workflow automation.

Some key features are:

  • Middleware
  • Hooks and Wraps
  • Middleware providers for cross-cutting concerns
  • Conditional flows
  • Loops
  • Parallel processing
  • Dependency injection
  • Early returns and cancellation
  • Child pipelines
  • Declarative and imperative validation, with a FluentValidation adapter
  • Command pattern with assembly scanning and DI registration
  • ASP.NET Core integration with RFC 7807 result mapping (ToResult())

Why Use Pipelines

Pipelines provide a structured approach to managing complex processes, promoting SOLID principles, including Inversion of Control (IoC) and Separation of Concerns (SoC). They enable composability, making it easier to build, test, and maintain your code. By extending the benefits of middleware and request-response pipelines throughout your application, you achieve greater modularity, scalability, and flexibility. This is particularly important in domains that demand compliance, auditing, strong identity and role management, or high-security standards—where clear boundaries and responsibilities are essential. Hyperbee.Pipeline ensures that the advantages of pipelines and middleware are not abandoned at the controller implementation, addressing a common gap in many frameworks. By using a functional approach, Hyperbee.Pipeline ensures that your pipelines are not only robust and maintainable but also highly adaptable to changing requirements.

Getting Started

To get started with Hyperbee.Pipeline, refer to the documentation site for detailed instructions and examples.

Install via NuGet:

dotnet add package Hyperbee.Pipeline

Building and Executing Pipelines

Pipelines are built using PipelineFactory. Once built, a pipeline is just an async function that takes a PipelineContext and an optional input value as parameters, and returns a result.

    var command = PipelineFactory
        .Start<string>()
        .Pipe( ( ctx, arg ) => $"hello {arg}" )
        .Build();

    var result = await command( new PipelineContext(), "pipeline" );

    Assert.AreEqual( "hello pipeline", result );

Dependency Injection

Sometimes Pipelines and Pipeline middleware need access to specific container services. This can be accomplished by registering services with the PipelineContextFactory. This can be done through DI configuration, or manually through the PipelineContextFactoryProvider if you are not using DI.

Pipelines manage dependencies with a specialized container. This allows the implementor to control the services that are exposed through the pipeline. If you want to expose all application services then you can call AddPipeline and pass includeAllServices: true.

Register pipelines with DI and provide Pipeline dependencies using the application container.

services.AddPipeline( includeAllServices: true );

Register Pipelines with DI and provide Pipeline dependencies using a specialized container.

services.AddPipeline( (factoryServices, rootProvider) =>
{
    factoryServices.AddTransient<IThing>()
    factoryServices.ProxyService<IPrincipalProvider>( rootProvider ); // pull from root container
} );

Middleware Providers

Use IPipelineMiddlewareProvider to define cross-cutting middleware (logging, error mapping, etc.) in one place and inject it via DI. The PipelineFactory.Create convenience method applies hooks and wraps automatically:

var command = PipelineFactory.Create<string, string>( middlewareProvider, builder =>
    builder
        .Pipe( ( ctx, arg ) => $"hello {arg}" )
        .Pipe( ( ctx, arg ) => $"{arg}!" )
);

For explicit control, use UseHooks and UseWraps builder extensions. See the Middleware documentation for details.

Pipeline of Pipelines

The PipelineFactory library allows you to use pipelines together. Since pipelines are just functions, they can be used as input to other pipelines. This allows you to create complex data processing flows by reusing and chaining together multiple pipelines.

Here's an example of how to use pipelines together:

var pipeline2 = PipelineFactory
    .Start<string>()
    .Pipe( ( ctx, arg ) => $"{arg} again!" )
    .Build();

var pipeline1 = PipelineFactory
    .Start<string>()
    .Pipe( ( ctx, arg ) => $"hello {arg}" )
    .PipeAsync( pipeline2 )
    .Build();

var result = await pipeline1( new PipelineContext(), "you" );

Assert.AreEqual( "hello you again!", result );

Conditional Flow and Advanced Features

The PipelineFactory library provides a variety of builders that allow you to customize the behavior of your pipelines. These methods provide powerful functionality for manipulating data as it passes through the pipeline.

  • Functions
  • Procedures
  • Conditional Flow
  • Iterators
  • Reduce
  • Parallel execution

Validation and Error Handling

Pipelines validate their inputs declaratively, and commands surface failure state as data — a command returns a result plus diagnostics instead of throwing:

var pipeline = PipelineFactory
    .Start<CreateUserRequest>()
    .ValidateAsync()                        // FluentValidation or custom validators
    .PipeAsync( ( ctx, request ) => CreateUser( request ) )
    .Build();

Project the diagnostics at your boundary: ToResult() maps validation failures to RFC 7807 responses (422/404/403/401) at the HTTP edge, while context.ThrowIfError() and context.ThrowIfInvalid() surface errors and validation failures to in-process callers. See the Validation documentation for details.

Packages

Package Description
Hyperbee.Pipeline Core pipeline builders, commands, middleware, and context
Hyperbee.Pipeline.Validation Framework-agnostic validation: ValidateAsync, failure types, ThrowIfInvalid
Hyperbee.Pipeline.Validation.FluentValidation FluentValidation adapter with assembly scanning
Hyperbee.Pipeline.AspNetCore ToResult() command-result mapping for minimal APIs, with customizable ResultMapper
Hyperbee.Pipeline.Auth Claims-based pipeline steps (WithAuth, PipeIfClaim)
Hyperbee.Pipeline.Caching Memory and distributed cache pipeline steps
Hyperbee.Pipeline.TestHelpers Test fixtures and CommandResult helpers

Target frameworks

Package Targets
Hyperbee.Pipeline, .Validation, .Validation.FluentValidation, .Caching, .TestHelpers net11.0, net10.0, netstandard2.1
Hyperbee.Pipeline.AspNetCore, .Auth net11.0, net10.0, net8.0

net8.0 and net9.0 reached end of support on 2026-11-10 and are not built directly. netstandard2.1 is the compatibility floor, so a net8.0 or net9.0 project resolves that asset. Hyperbee.Pipeline.AspNetCore and Hyperbee.Pipeline.Auth are the exception: their FrameworkReference on Microsoft.AspNetCore.App resolves only for a runtime target, so they ship net8.0 instead.

On netstandard2.1, Hyperbee.Pipeline.Validation.FluentValidation and Hyperbee.Pipeline.TestHelpers depend on FluentValidation 11.12, the last release line with a netstandard2.1 asset; net10.0 and net11.0 use FluentValidation 12. A net8.0 application may still reference FluentValidation 12 itself.

Upgrading from 2.x

3.0 replaces the net8.0 and net9.0 assets of the five packages above with netstandard2.1. Applications rebuild against it without source changes. A library that was compiled against a 2.x net8.0 asset and sets an init property, for example new PipelineContext { HaltOnError = false }, throws MissingMethodException until it is rebuilt against 3.0.

Building this repository requires the .NET 11 SDK; the older targeting packs come from NuGet.

Credits

Hyperbee.Pipeline is built upon the great work of several open-source projects. Special thanks to:

Contributing

We welcome contributions! Please see our Contributing Guide for more details.

Status

Branch Action
main Build status
Product 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 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.  net11.0 is compatible. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on Hyperbee.Pipeline:

Package Downloads
Hyperbee.Pipeline.Validation

Base validation implementations and extensions for Hyperbee.Pipeline async pipelines

Hyperbee.Pipeline.AspNetCore

ASP.NET Core integration for Hyperbee.Pipeline with command result mapping and validation

Hyperbee.Pipeline.Caching

Caching for Hyperbee.Pipelines async pipelines

Hyperbee.Pipeline.Auth

Auth for Hyperbee.Pipelines async pipelines

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.0 285 11/28/2026
2.16.1 216 11/26/2026
2.16.0 213 11/26/2026
2.15.0 9,912 7/15/2026
2.14.0 3,009 6/8/2026
2.13.0 2,113 5/19/2026
2.12.0 1,602 4/12/2026
2.11.1 2,086 3/26/2026
2.10.1-alpha-gc6f6d9837f 232 3/25/2026
2.9.1 2,827 3/19/2026
2.9.0 349 3/19/2026
2.8.2 401 3/16/2026
2.7.0 2,942 2/28/2026
2.6.0 345 2/28/2026
2.5.0 352 2/28/2026
2.4.0 387 2/27/2026
2.3.3 4,645 2/24/2026
2.3.2 751 2/18/2026
2.3.1 351 2/18/2026
2.3.0 369 2/17/2026
Loading failed