SquidStd.Generators
0.32.1
See the version list below for details.
dotnet add package SquidStd.Generators --version 0.32.1
NuGet\Install-Package SquidStd.Generators -Version 0.32.1
<PackageReference Include="SquidStd.Generators" Version="0.32.1" />
<PackageVersion Include="SquidStd.Generators" Version="0.32.1" />
<PackageReference Include="SquidStd.Generators" />
paket add SquidStd.Generators --version 0.32.1
#r "nuget: SquidStd.Generators, 0.32.1"
#:package SquidStd.Generators@0.32.1
#addin nuget:?package=SquidStd.Generators&version=0.32.1
#tool nuget:?package=SquidStd.Generators&version=0.32.1
<h1 align="center">SquidStd.Generators</h1>
Roslyn source generators for SquidStd compile-time registration helpers.
Install
dotnet add package SquidStd.Generators
Usage
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. Each registration family has its own marker attribute and generated extension
method, all calling the same runtime APIs as manual registration (RegisterStdService, RegisterConfigSection,
AddJobHandler, RegisterScriptModule).
Key types
| Marker attribute | Generated method |
|---|---|
[RegisterEventListener] |
RegisterGeneratedEventListeners() |
[RegisterStdService(typeof(IMyService), Priority = 10)] |
RegisterGeneratedStdServices() |
[RegisterConfigSection("workers", Priority = -50)] |
RegisterGeneratedConfigSections() |
[RegisterJobHandler] |
RegisterGeneratedJobHandlers() |
[RegisterScriptModule] with [ScriptModule("name")] |
RegisterGeneratedScriptModules() |
Related
Tutorial: Source generators: event listeners
Tutorial: Source generators: registration
License
MIT - part of SquidStd.
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.41.2 | 109 | 9/1/2026 |
| 0.41.1 | 110 | 8/5/2026 |
| 0.41.0 | 126 | 7/24/2026 |
| 0.40.1 | 121 | 7/23/2026 |
| 0.40.0 | 113 | 7/21/2026 |
| 0.39.0 | 122 | 7/20/2026 |
| 0.38.0 | 119 | 7/20/2026 |
| 0.37.0 | 118 | 7/17/2026 |
| 0.36.0 | 128 | 7/15/2026 |
| 0.35.0 | 114 | 7/15/2026 |
| 0.34.0 | 121 | 7/14/2026 |
| 0.33.1 | 109 | 7/13/2026 |
| 0.33.0 | 116 | 7/13/2026 |
| 0.32.1 | 114 | 7/13/2026 |
| 0.32.0 | 112 | 7/13/2026 |
| 0.31.0 | 115 | 7/12/2026 |
| 0.30.0 | 117 | 7/12/2026 |
| 0.29.0 | 112 | 7/11/2026 |
| 0.28.0 | 133 | 7/8/2026 |
| 0.27.0 | 129 | 7/7/2026 |