KhaosCode.Pipeline.Abstractions
1.0.6
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
<PackageReference Include="KhaosCode.Pipeline.Abstractions" Version="1.0.6" />
<PackageVersion Include="KhaosCode.Pipeline.Abstractions" Version="1.0.6" />
<PackageReference Include="KhaosCode.Pipeline.Abstractions" />
paket add KhaosCode.Pipeline.Abstractions --version 1.0.6
#r "nuget: KhaosCode.Pipeline.Abstractions, 1.0.6"
#:package KhaosCode.Pipeline.Abstractions@1.0.6
#addin nuget:?package=KhaosCode.Pipeline.Abstractions&version=1.0.6
#tool nuget:?package=KhaosCode.Pipeline.Abstractions&version=1.0.6
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
TIn→TOut - 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
PipelineContextfor 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 |
Related Packages
KhaosCode.Pipeline- Implementation of pipeline executionKhaosCode.Flow.Abstractions- Flow abstractions (complementary pattern)KhaosCode.Flow- Flow implementation
License
MIT License - see LICENSE.md
| Product | Versions 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. |
-
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 |