The framework-native CQRS / mediator pipeline for NFramework .NET services. It provides command, query, event, and stream dispatch with pipeline behaviors, built for Native AOT through compile-time source generation instead of runtime reflection.
- Compile-Time Registration: A source generator emits deterministic handler registration — no runtime assembly scanning.
- Native AOT Ready: Zero reflection on the dispatch path.
- Result-Friendly: Designed to carry the
Result/Result<T>application flow. - Pipeline Behaviors: Cross-cutting concerns (validation, caching, logging, transactions) as composable behaviors.
| Project | Description |
|---|---|
NFramework.Mediator.Abstractions |
Command, query, event, stream, and behavior contracts. Zero external dependencies. |
NFramework.Mediator.Mediator |
Mediator dispatch implementation built on the abstractions. |
NFramework.Mediator.Mediator.Generators |
Source generator emitting compile-time handler registration. |
NFramework.Mediator.Mediator.Validation.FluentValidation |
Validation behavior adapter for FluentValidation. |
make buildOr directly:
dotnet build NFramework.Mediator.slnxmake testOr directly:
dotnet test NFramework.Mediator.slnxmake format
make lintmake setupThis project is licensed under the Apache License 2.0 - see the LICENSE file for details.