XForge.MediatR.Generator
0.21.0
The owner has unlisted this package.
This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package XForge.MediatR.Generator --version 0.21.0
NuGet\Install-Package XForge.MediatR.Generator -Version 0.21.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="XForge.MediatR.Generator" Version="0.21.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="XForge.MediatR.Generator" Version="0.21.0" />
<PackageReference Include="XForge.MediatR.Generator" />
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 XForge.MediatR.Generator --version 0.21.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: XForge.MediatR.Generator, 0.21.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 XForge.MediatR.Generator@0.21.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=XForge.MediatR.Generator&version=0.21.0
#tool nuget:?package=XForge.MediatR.Generator&version=0.21.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
XForge.MediatR
<p align="center"> <img src="icon.png" alt="XForge.MediatR" width="128" height="128" /> </p>
Simple, fluent, in-process mediator for .NET with CQRS, pipeline behaviors, and local events.
Quick Start
using XForge.MediatR.DependencyInjection;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddXForgeMediator(cfg =>
{
cfg.RegisterHandlersFrom<Program>();
cfg.UseValidation();
cfg.UseLogging();
cfg.UsePerformanceMetrics();
});
var app = builder.Build();
app.MapGet("/orders/{id}", async (int id, IXForgeMediator mediator) =>
{
var order = await mediator.Send(new GetOrder(id));
return Results.Ok(order);
});
app.Run();
Features
- CQRS —
IRequest<T>,ICommand<T>,IQuery<T>,ICommand,IQuery,ICommandHandler,IQueryHandler - Events —
IEventwith sequential or parallel publish, custom publishers,IDomainEvent, event filters - Streaming —
IStreamRequest<T>withIAsyncEnumerableand stream behaviors - Pipeline —
IRequestBehavior<TReq, TRes>with ordering, filtering, short-circuit - Built-in behaviors — Validation, Logging, Performance Metrics, Diagnostics
- Resilience — Retry (exponential/linear/constant backoff), Circuit Breaker, Rate Limiter, Concurrency Limiter
- Enterprise — Authorization, Idempotency, Caching, Audit, Transaction behaviors
- Exception Handling —
IRequestExceptionHandler<TReq, TRes, TEx>with fallback responses - Pre/Post Processors —
IPreProcessor<T>,IPostProcessor<T, TRes> - Result<T> — Native success/failure pattern without exceptions
- Cascading Messages —
ICascadeHandler<TReq, TRes>with automatic recursive dispatch - POCO Handlers — Convention-based handler detection (opt-in via
UsePocoHandlers()) - Handler Delegates — Inline handlers via
Handle<TReq,TRes>(),HandleVoid<TReq>(),HandleEvent<TEvent>() - Fluent DI — Assembly scanning, per-request behavior filters, flat API
- Testable —
TestableMediatorfor unit tests without DI container - Source Generator — Zero-reflection handler registration at compile-time
- Roslyn Analyzer — Duplicate handler detection at compile-time
- OpenTelemetry — Dedicated package for traces and metrics
- Zero magic — Explicit, predictable, debuggable
Packages
Installation
dotnet add package XForge.MediatR.DependencyInjection
Optional packages:
dotnet add package XForge.MediatR.Testing
dotnet add package XForge.MediatR.Generator
dotnet add package XForge.MediatR.OpenTelemetry
Documentation
Complete enterprise-grade manual with examples from basic to advanced:
License
MIT
There are no supported framework assets in this package.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|