You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build completely message-oriented, loosely coupled .NET apps that are easy to test — with near-direct-call performance and zero boilerplate. Powered by source generators and interceptors.
> **Prefer explicit interfaces?** Use `IHandler` marker interface or `[Handler]` attributes instead. See [Handler Conventions](https://mediator.foundatio.dev/guide/handler-conventions.html#explicit-handler-declaration).
57
-
58
-
## 🚀 Quick Start
8
+
Foundatio Mediator is a high-performance mediator library for .NET that uses source generators and C# interceptors to achieve near-direct-call performance with zero runtime reflection. Build completely message-oriented, loosely coupled apps that are easy to test — with zero boilerplate.
- ⚡ **[Convention-based discovery](https://mediator.foundatio.dev/guide/handler-conventions.html)** — handlers discovered by naming conventions, no interfaces or base classes required
14
+
- 🧩 **[Plain handler classes](https://mediator.foundatio.dev/guide/handler-conventions.html)** — sync or async, static or instance methods, any signature, multiple handlers per class
15
+
- 🌐 **[Auto-generated API endpoints](https://mediator.foundatio.dev/guide/endpoints.html)** — Minimal API endpoints generated from handlers with route, method, and parameter binding inference
16
+
- 🎯 **[Built-in Result\<T>](https://mediator.foundatio.dev/guide/result-types.html)** — rich status handling without exceptions, auto-mapped to HTTP status codes
17
+
- 🎪 **[Middleware pipeline](https://mediator.foundatio.dev/guide/middleware.html)** — Before/After/Finally/Execute hooks with state passing and short-circuiting
- 🔧 **[Full DI support](https://mediator.foundatio.dev/guide/dependency-injection.html)** — constructor and method parameter injection via Microsoft.Extensions.DependencyInjection
20
+
- 🔐 **[Authorization](https://mediator.foundatio.dev/guide/authorization.html)** — built-in attribute-based authorization with policy support
21
+
- 📡 **[Streaming handlers](https://mediator.foundatio.dev/guide/streaming-handlers.html)** — `IAsyncEnumerable<T>` support with SSE endpoint generation
**👉 [Getting Started Guide](https://mediator.foundatio.dev/guide/getting-started.html)** — step-by-step setup with code samples for ASP.NET Core and console apps.
HTTP methods, routes, and parameter binding are inferred from message names and properties. `Result<T>` maps to the correct HTTP status codes automatically. Pass `logEndpoints: true` to see all mapped routes at startup:
163
-
164
-
```csharp
165
-
app.MapProductsEndpoints(logEndpoints: true);
166
-
```
167
-
168
-
See [Endpoints Guide](https://mediator.foundatio.dev/guide/endpoints.html) for route customization, OpenAPI metadata, authorization, and more.
After building, check the `Generated` folder for handler wrappers, DI registrations, and interceptor code. See [Troubleshooting](https://mediator.foundatio.dev/guide/troubleshooting.html) for more details.
214
-
215
50
## 📦 CI Packages (Feedz)
216
51
217
52
Want the latest CI build before it hits NuGet? Add the Feedz source (read‑only public) and install the pre-release version:
0 commit comments