TimeWarp.Mediator.Generators
14.0.0
Prefix Reserved
dotnet add package TimeWarp.Mediator.Generators --version 14.0.0
NuGet\Install-Package TimeWarp.Mediator.Generators -Version 14.0.0
<PackageReference Include="TimeWarp.Mediator.Generators" Version="14.0.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="TimeWarp.Mediator.Generators" Version="14.0.0" />
<PackageReference Include="TimeWarp.Mediator.Generators"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add TimeWarp.Mediator.Generators --version 14.0.0
#r "nuget: TimeWarp.Mediator.Generators, 14.0.0"
#:package TimeWarp.Mediator.Generators@14.0.0
#addin nuget:?package=TimeWarp.Mediator.Generators&version=14.0.0
#tool nuget:?package=TimeWarp.Mediator.Generators&version=14.0.0
TimeWarp.Mediator.Generators
Source generator for TimeWarp Mediator 14.0. It emits an internal mediator so Send is a direct call: less time, fewer bytes, and a trim and NativeAOT safe path.
Install
dotnet add package TimeWarp.Mediator.Contracts --version 14.0.0
dotnet add package TimeWarp.Mediator.Generators --version 14.0.0
Generators does not bring Contracts with it. Keep both on 14.0.0. This package bundles the analyzers (TWM001–TWM004) and adds TWM005–TWM011.
Example
public sealed class Ping : IRequest<string> { }
public sealed class PingHandler : IRequestHandler<Ping, string>
{
public Task<string> Handle(Ping request, CancellationToken cancellationToken) =>
Task.FromResult("Pong");
}
services.AddGeneratedMediator();
string reply = await provider.GetRequiredService<ISender>().Send(new Ping());
The host that references this package is a graph member. A library opts in with [assembly: MediatorAssembly]. Register a pipeline behavior with [assembly: MediatorBehavior(typeof(MyBehavior<,>))]. Set <TimeWarpMediatorProfile>Aot</TimeWarpMediatorProfile> for dispatch with no IServiceProvider (handlers are new Handler() singletons, and behaviors are not woven).
Migration
14.0.0 is not a drop-in for 13.0.0.
AddMediator()does not register this generator's mediator. Replace it withAddGeneratedMediator()in the host.- Contracts targets net10.0. The generator itself is netstandard2.0 because Roslyn loads it. You need Roslyn 4.8 or later, and in practice the .NET 10 SDK, because Contracts targets net10.0.
- Streams, pre/post processors, and the exception cascade are not dispatched (TWM009). Keep
AddMediator()if you still need them. - A missing or duplicate handler is a build error (TWM001, TWM002), not a runtime exception.
Matrix and steps: 13.x reflection to 14.x generated.
Documentation
License
Released under The Unlicense. The notice and unlicense files ship in this package.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on TimeWarp.Mediator.Generators:
| Package | Downloads |
|---|---|
|
TimeWarp.Nuru
Route-based CLI framework for .NET - batteries included with telemetry, REPL, and shell completion |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 14.0.0 | 313 | 10/13/2026 |
| 14.0.0-beta.5 | 244 | 10/13/2026 |
| 14.0.0-beta.4 | 893 | 9/27/2026 |
| 14.0.0-beta.3 | 70 | 9/25/2026 |
| 14.0.0-beta.2 | 66 | 9/25/2026 |
| 14.0.0-beta.1 | 275 | 9/2/2026 |