KhaosCode.Pipeline.Abstractions 1.0.6

Additional Details

This was a bit of an experiment to see how to use nuget. I understand a tiny bit more now than before. Please feel free to look at the KhaosKoder.* series of packages. They replace this package - with absolutely minimal code changes required. I will try to keep the packages stable under those names from here on.

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

Khaos.Pipeline.Abstractions

Core abstractions for composable data transformation pipelines with batch processing support.

Overview

This package provides the interfaces and core types for defining processing pipelines - linear chains of transformation steps where each step transforms input to output.

Key characteristics of Pipelines:

  • Transformation: Steps transform TInTOut
  • Deterministic: Every input produces an output (Continue) or explicit abort
  • Batch-aware: Steps can optionally process entire batches for efficiency
  • Context-based: Steps share a PipelineContext for state

Key Types

Type Description
IPipelineStep<TIn, TOut> A single transformation step
IBatchAwareStep<TIn, TOut> Optional interface for batch processing
IProcessingPipeline<TIn, TOut> A composed pipeline
StepOutcome<TOut> The result: Continue(value) or Abort()
IPipelineContext Shared state interface for pipeline execution

Usage

// Define a pipeline step
public class ValidateRecordStep : IPipelineStep<RawRecord, ValidatedRecord>
{
    public ValueTask<StepOutcome<ValidatedRecord>> InvokeAsync(
        RawRecord input, 
        IPipelineContext context, 
        CancellationToken ct)
    {
        if (!IsValid(input))
            return ValueTask.FromResult(StepOutcome<ValidatedRecord>.Abort());
            
        return ValueTask.FromResult(
            StepOutcome<ValidatedRecord>.Continue(new ValidatedRecord(input)));
    }
}

When to Use Pipelines vs Flows

Use Pipelines When Use Flows When
Processing messages/records Need branching logic
Linear transformation chain Orchestrating workflows
Every input needs an output Steps may take different paths
Data transformation State-machine workflows
  • KhaosCode.Pipeline - Implementation of pipeline execution
  • KhaosCode.Flow.Abstractions - Flow abstractions (complementary pattern)
  • KhaosCode.Flow - Flow implementation

License

MIT License - see LICENSE.md

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on KhaosCode.Pipeline.Abstractions:

Package Downloads
KhaosCode.Processing.Pipelines

Composable high-performance processing pipelines with batch execution support.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.6 58 3/12/2026 1.0.6 is deprecated because it is no longer maintained.