SquidStd.Generators 0.8.0

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

SquidStd.Generators

Roslyn source generators for SquidStd compile-time registration helpers.

Install

dotnet add package SquidStd.Generators

Event listeners

The event listener generator discovers concrete IEventListener<TEvent> implementations marked with [RegisterEventListener] and generates a DryIoc registration extension:

using SquidStd.Abstractions.Attributes;
using SquidStd.Core.Interfaces.Events;

[RegisterEventListener]
public sealed class PingListener : IEventListener<PingEvent>
{
    public Task HandleAsync(PingEvent eventData, CancellationToken cancellationToken = default)
        => Task.CompletedTask;
}

container.RegisterGeneratedEventListeners();

The generated method reuses the normal RegisterEventListener<TEvent,TListener>() runtime path, so listener activation stays compatible with SquidStd.Services.Core.

Other generated registrations

Each registration family has its own marker attribute and generated extension method:

Marker attribute Generated method
[RegisterStdService(typeof(IMyService), Priority = 10)] RegisterGeneratedStdServices()
[RegisterConfigSection("workers", Priority = -50)] RegisterGeneratedConfigSections()
[RegisterJobHandler] RegisterGeneratedJobHandlers()
[RegisterScriptModule] with [ScriptModule("name")] RegisterGeneratedScriptModules()

The generated methods call the same runtime APIs as manual registration: RegisterStdService, RegisterConfigSection, AddJobHandler, and RegisterScriptModule.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

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
0.8.0 0 6/28/2026
0.7.0 42 6/26/2026