HelixBus.MessageBus.SourceGenerator 1.2.0

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

HelixBus.MessageBus.SourceGenerator

C# incremental source generator for HelixBus.
Generates strongly-typed handler mappings and avoids reflection at runtime.


🚀 Features

  • Discover handlers at compile time
  • Generate fast jump-table dispatchers
  • Compatible with [MediatorHandler] attribute
  • Fully incremental for performance

📦 Installation

dotnet add package HelixBus.MessageBus.SourceGenerator

🛠 Usage Example

Add attribute to handlers

[MessengerHandler]
public class GetUserQueryHandler : IRequestHandler<GetUserQuery, UserDto>
{
    public Task<UserDto> Handle(GetUserQuery request, CancellationToken cancellationToken)
        => Task.FromResult(new UserDto(request.Id, "John Doe"));
}

Build your project

The generator will create strongly-typed mediator maps automatically. No runtime reflection required.

Benefits

  • Faster dispatch at runtime
  • Compile-time safety
  • Clean architecture-friendly

💡 Best Practices

  • Always use [MediatorHandler] attribute on request/notification handlers
  • Combine with HelixBus.MessageBus.DependencyInjection for automatic registration
  • Keep behaviors generic and reusable for pipeline processing

📄 License

MIT License. See LICENSE file.

There are no supported framework assets in this 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
1.2.0 255 1/5/2026
1.1.0 600 12/8/2025
1.0.1 469 12/7/2025
1.0.0 476 12/7/2025