Spider.Pipelines
1.0.0
dotnet add package Spider.Pipelines --version 1.0.0
NuGet\Install-Package Spider.Pipelines -Version 1.0.0
<PackageReference Include="Spider.Pipelines" Version="1.0.0" />
<PackageVersion Include="Spider.Pipelines" Version="1.0.0" />
<PackageReference Include="Spider.Pipelines" />
paket add Spider.Pipelines --version 1.0.0
#r "nuget: Spider.Pipelines, 1.0.0"
#:package Spider.Pipelines@1.0.0
#addin nuget:?package=Spider.Pipelines&version=1.0.0
#tool nuget:?package=Spider.Pipelines&version=1.0.0
🕷️Spider.Pipelines
Modular. Flexible. Seamless operation pipelines for .NET.
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 | Versions 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. |
-
net6.0
-
net7.0
-
net8.0
-
net9.0
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 |