MediateX 3.3.1

Requires NuGet 6.0 or higher.

dotnet add package MediateX --version 3.3.1
                    
NuGet\Install-Package MediateX -Version 3.3.1
                    
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="MediateX" Version="3.3.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MediateX" Version="3.3.1" />
                    
Directory.Packages.props
<PackageReference Include="MediateX" />
                    
Project file
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 MediateX --version 3.3.1
                    
#r "nuget: MediateX, 3.3.1"
                    
#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 MediateX@3.3.1
                    
#: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=MediateX&version=3.3.1
                    
Install as a Cake Addin
#tool nuget:?package=MediateX&version=3.3.1
                    
Install as a Cake Tool

MediateX Logo

MediateX

A pure mediator for .NET 10+

In-process messaging done right. Request/response, notifications, and streaming with a clean pipeline architecture.

NuGet License


Support

If MediateX helps your projects, consider supporting its development:

GitHub stars PayPal Ko-fi


Install

dotnet add package MediateX

Usage

// Setup
builder.Services.AddMediateX(cfg =>
    cfg.RegisterServicesFromAssemblyContaining<Program>());

// Request
public record GetUser(int Id) : IRequest<User>;

// Handler
public class GetUserHandler : IRequestHandler<GetUser, User>
{
    public Task<User> Handle(GetUser request, CancellationToken ct)
        => _db.Users.FindAsync(request.Id, ct);
}

// Send
var user = await mediator.Send(new GetUser(42));

Features

  • Request/Response - IRequest<T>, IRequestHandler<,>
  • Notifications - INotification, INotificationHandler<>
  • Streaming - IStreamRequest<T> with IAsyncEnumerable
  • Pipeline Behaviors - IPipelineBehavior<,> for cross-cutting concerns
  • Exception Handling - IRequestExceptionHandler<,,> with recovery

Docs

Full documentation at docs/


~2,700 lines of code · 1 dependency · 168 tests

MIT | Based on MediatR 12.5.0

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
3.3.1 1,366 5/25/2026
3.2.0 15,062 1/10/2026
2.1.0 687 12/2/2025

v3.3.1 - Repository cleanup: removed abandoned MediateX.SourceGenerator spike project, its sample, and related research/spec notes. No runtime change vs v3.3.0.