Davish.Sendr is a mediator library for .NET. It dispatches request/response messages and async streams to exactly one handler each, publishes notifications to any number of handlers, and wraps any of them with a decorator pipeline. Handlers can be registered manually or discovered at compile time by a Roslyn source generator; neither path scans assemblies at runtime.
Targets netstandard2.0 and net10.0.
dotnet add package Davish.SendrWhere to start
- Getting started — install the package and dispatch your first request.
- Concepts — how the library is put together and why:
- Dispatch model — requests, commands/queries, streams, and how errors surface.
- Decorator pipeline — the non-generic pipeline that wraps handlers.
- Notification model — Sequence/Parallel handler groups and exception aggregation.
- Compile-time discovery — what
Davish.Sendr.Generatorsdoes and how it relates to manual registration.
- Guides — task-oriented how-tos:
- Reference:
- Packages — every package this repository produces, and which one to use.
- Exceptions and diagnostics — runtime
exceptions and the
SENDR0xxcompiler diagnostics. - Extensibility — plugging in a custom
ISender,IStreamSender, orIPublisher.
Packages at a glance
| Package | Purpose |
|---|---|
Davish.Sendr | Request/response and stream dispatch, notification publishing, decorator pipeline. |
Davish.Sendr.Abstractions | Contracts only (IRequest, ICommand, IQuery, INotification, ISender, …) for domain assemblies that shouldn’t depend on the DI implementation. |
Davish.Sendr.Generators | Optional Roslyn source generator for compile-time handler discovery and reflection-free dispatch. |
Davish.Sendr.Message, Davish.Sendr.Notification, and Davish.Sendr.Notification.Abstractions
are deprecated compatibility packages — see
Migrating from deprecated packages and the
full package reference.