TimeWarp.Mediator
13.0.0
Prefix Reserved
dotnet add package TimeWarp.Mediator --version 13.0.0
NuGet\Install-Package TimeWarp.Mediator -Version 13.0.0
<PackageReference Include="TimeWarp.Mediator" Version="13.0.0" />
<PackageVersion Include="TimeWarp.Mediator" Version="13.0.0" />
<PackageReference Include="TimeWarp.Mediator" />
paket add TimeWarp.Mediator --version 13.0.0
#r "nuget: TimeWarp.Mediator, 13.0.0"
#:package TimeWarp.Mediator@13.0.0
#addin nuget:?package=TimeWarp.Mediator&version=13.0.0
#tool nuget:?package=TimeWarp.Mediator&version=13.0.0
TimeWarp Mediator
Simple, unambitious 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.
About This Fork
TimeWarp.Mediator is a fork of the excellent MediatR library by Jimmy Bogard. We created this fork to:
- ✅ Correct the spelling from "MediatR" to "Mediator"
- ✅ Release under The Unlicense for maximum freedom
- ✅ Maintain full API compatibility with MediatR
- ✅ Add helpful diagnostic tools like
GetPipelineInfo()
Migration from MediatR
Migrating from MediatR is straightforward - see our migration guide for step-by-step instructions.
Original MediatR
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.
Examples in the wiki.
Installing TimeWarp.Mediator
You should install TimeWarp.Mediator with NuGet:
Install-Package TimeWarp.Mediator
Or via the .NET Core command line interface:
dotnet add package TimeWarp.Mediator
Either commands, from Package Manager Console or .NET Core CLI, will download and install TimeWarp.Mediator and all required dependencies.
Using Contracts-Only Package
To reference only the contracts for TimeWarp.Mediator, which includes:
IRequest
(including generic variants)INotification
IStreamRequest
Add a package reference to TimeWarp.Mediator.Contracts
This package is useful in scenarios where your TimeWarp.Mediator contracts are in a separate assembly/project from handlers. Example scenarios include:
- API contracts
- GRPC contracts
- Blazor
Registering with IServiceCollection
TimeWarp.Mediator supports Microsoft.Extensions.DependencyInjection.Abstractions
directly. To register various Mediator services and handlers:
services.AddMediator(cfg => cfg.RegisterServicesFromAssemblyContaining<Startup>());
or with an assembly:
services.AddMediator(cfg => cfg.RegisterServicesFromAssembly(typeof(Startup).Assembly));
This registers:
IMediator
as transientISender
as transientIPublisher
as transientIRequestHandler<,>
concrete implementations as transientIRequestHandler<>
concrete implementations as transientINotificationHandler<>
concrete implementations as transientIStreamRequestHandler<>
concrete implementations as transientIRequestExceptionHandler<,,>
concrete implementations as transientIRequestExceptionAction<,>)
concrete implementations as transient
This also registers open generic implementations for:
INotificationHandler<>
IRequestExceptionHandler<,,>
IRequestExceptionAction<,>
To register behaviors, stream behaviors, pre/post processors:
services.AddMediator(cfg => {
cfg.RegisterServicesFromAssembly(typeof(Startup).Assembly);
cfg.AddBehavior<PingPongBehavior>();
cfg.AddStreamBehavior<PingPongStreamBehavior>();
cfg.AddRequestPreProcessor<PingPreProcessor>();
cfg.AddRequestPostProcessor<PingPongPostProcessor>();
cfg.AddOpenBehavior(typeof(GenericBehavior<,>));
});
With additional methods for open generics and overloads for explicit service types.
License
TimeWarp Mediator is released under The Unlicense (see UNLICENSE
). Original MediatR code by Jimmy Bogard is under Apache 2.0 (see NOTICE
).
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
- TimeWarp.Mediator.Contracts (>= 13.0.0)
-
net6.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
- TimeWarp.Mediator.Contracts (>= 13.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on TimeWarp.Mediator:
Package | Downloads |
---|---|
TimeWarp.State
A Blazor state management library by TimeWarp |
|
TimeWarp.Nuru
Route-based CLI framework for .NET - bringing web-style routing to command-line applications |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
13.0.0 | 223 | 8/4/2025 |
13.0.0-beta.4 | 101 | 7/30/2025 |
13.0.0-beta.3 | 95 | 7/28/2025 |
13.0.0-beta.2 | 54 | 7/5/2025 |
13.0.0-beta.1 | 52 | 7/5/2025 |