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
                    
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="TimeWarp.Mediator.Generators" Version="14.0.0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TimeWarp.Mediator.Generators" Version="14.0.0" />
                    
Directory.Packages.props
<PackageReference Include="TimeWarp.Mediator.Generators">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
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 TimeWarp.Mediator.Generators --version 14.0.0
                    
#r "nuget: TimeWarp.Mediator.Generators, 14.0.0"
                    
#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 TimeWarp.Mediator.Generators@14.0.0
                    
#: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=TimeWarp.Mediator.Generators&version=14.0.0
                    
Install as a Cake Addin
#tool nuget:?package=TimeWarp.Mediator.Generators&version=14.0.0
                    
Install as a Cake Tool

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 with AddGeneratedMediator() 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.

There are no supported framework assets 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