Spider.Pipelines 1.0.0

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

🕷️Spider.Pipelines

Modular. Flexible. Seamless operation pipelines for .NET.

Build NuGet License: MIT


Spider.Pipelines is a lightweight and flexible .NET library designed to help developers build powerful operation pipelines. It lets you easily attach preprocessors, middlewares, override methods, and postprocessors to your existing logic — just like a spider weaving a smart, modular web. With its clean API and pluggable architecture, you can extend, intercept, or transform operations step by step, making your code more maintainable and testable.


  • ✨ Features

    • 🕷️ Modular: build pipelines with preprocessors, middlewares, overrides, and postprocessors
    • ⚡ Fast: delegate-based and optimized for performance
    • 🔌 DI-friendly: plug seamlessly into any IServiceProvider
    • 🧩 Composable: chain and nest pipeline steps with full control
    • 🧼 Zero dependencies (except for DI abstractions)
    • 🧪 Battle-tested with xUnit & NSubstitute
    • 🛠️ Extensible: create custom steps, handlers, and behaviors
    • 🧠 Introspectable: pipeline metadata available at runtime
    • 🧵 Thread-safe: pipelines are designed for concurrent execution

📦 Installation

dotnet add package Spider.Pipelines

🚀 Quick Start

1. Register Spider in your DI container

services.AddSpider();

2. Define a service and pipeline

public class MyService
{
    public Task<string> Handle(string input, CancellationToken token)
    {
        // Your business logic here
        return Task.FromResult($"Hello, {input}!");
    }
}

3. Attach pipeline steps

var spider = provider.GetRequiredService<ISpider>();

var bridge = spider.InitBridge<MyService>();
bridge.Attach<string, string>(builder =>
{
    builder.OnPreProcess(cfg =>
    {
        cfg.OnPreProcess((ctx, args) =>
        {
            Console.WriteLine($"Preprocessing: {ctx.Request}");
            return Task.CompletedTask;
        });
    });
    builder.OnTargeting(cfg =>
    {
        cfg.Overrides((req, token) => Task.FromResult($"Targeted: {req}"));
    });
    builder.OnPostProcess(cfg =>
    {
        cfg.OnSuccess((ctx, args) =>
        {
            Console.WriteLine($"Success: {ctx.Response}");
            return Task.CompletedTask;
        });
    });
});

4. Execute the pipeline

var result = await bridge.ExecuteAsync(
    svc => (input, token) => svc.Handle(input, token),
    "World"
);
Console.WriteLine(result); // Output: Hello, World!

🛠️ Upcoming Features

  • Add middlewares Adding middleware execution.
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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 is compatible.  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 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.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Spider.Pipelines:

Package Downloads
Krackend.Sagas.Orchestration

Krackend.Sagas.Orchestration provides orchestration, error handling, and pipeline support for distributed saga patterns in .NET applications.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 159 7/18/2025