Simple mediator implementation in .NET. In-process messaging with no dependencies. Supports request/response, commands, queries, notifications and events, synchronous and async with intelligent dispatching via C# generic variance. You should install MediatR with NuGet. Or via the .NET Core command line interface. Either commands, from Package Manager Console or .NET Core CLI, will download and install MediatR and all required dependencies. MediatR is a low-ambition library trying to solve a simple problem, decoupling the in-process sending of messages from handling messages. Cross-platform, supporting .NET Framework 4.6.1 and netstandard2.0. MediatR has no dependencies. You will need to configure a single factory delegate, used to instantiate all handlers, pipeline behaviors, and pre/post-processors.

Features

  • The factory delegates are named delegates around a couple of generic factory methods
  • Declare whatever flavor of handler you need
  • Request/response messages, dispatched to a single handler
  • Notification messages, dispatched to multiple handlers
  • The request/response interface handles both command and query scenarios
  • Handler interfaces are contravariant

Project Samples

Project Activity

See All Activity >

Categories

System

License

Apache License V2.0

Follow MediatR

MediatR Web Site

Other Useful Business Software
Gemini 3 and 200+ AI Models on One Platform Icon
Gemini 3 and 200+ AI Models on One Platform

Access Google's best plus Claude, Llama, and Gemma. Fine-tune and deploy from one console.

Build generative AI apps with Vertex AI. Switch between models without switching platforms.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of MediatR!

Additional Project Details

Programming Language

C#

Related Categories

C# System Software

Registered

2021-08-26