The source generator will scan all assemblies which are referenced by the PiBox.Hosting.Webhost project and add any classes or interfaces which are implementing
the interface IPluginActivateable
any class attribute which starts with the name PiBox
to generate a class like the following example
usingSystem;usingSystem.Diagnostics.CodeAnalysis;usingSystem.CodeDom.Compiler;namespacePiBox.Generated;[ExcludeFromCodeCoverage][GeneratedCode("PiBox.Hosting.Generator","0.5.0.0")]publicclassPiBoxPluginTypes {publicstaticType[] All =newType[] {typeof(PiBox.Hosting.WebHost.Sample.HangfireTestJob),typeof(PiBox.Hosting.WebHost.Sample.WebHostSamplePlugin),typeof(PiBox.Hosting.WebHost.Sample.NpgsqlDbConfiguration),typeof(PiBox.Api.OpenApi.OpenApiConfiguration),typeof(PiBox.Api.OpenApi.OpenApiPlugin),typeof(PiBox.Plugins.Authorization.Keycloak.KeycloakPlugin),typeof(PiBox.Plugins.Authorization.Keycloak.KeycloakPluginConfiguration),typeof(PiBox.Plugins.Endpoints.RestResourceEntity.RestResourceEntityPlugin),typeof(PiBox.Plugins.Jobs.Hangfire.HangfireConfiguration),typeof(PiBox.Plugins.Jobs.Hangfire.HangFirePlugin),typeof(PiBox.Plugins.Persistence.EntityFramework.EntityFrameworkPlugin),typeof(PiBox.Hosting.Abstractions.Middlewares.ExceptionMiddleware),typeof(PiBox.Hosting.Abstractions.Middlewares.RequestContentLengthLimitMiddleware),typeof(PiBox.Plugins.Handlers.Cqrs.SimpleResource.CqrsSimpleResourcePlugin), };}
This class then gets referenced by the webhost's Program.cs e.g.
If you don't include the generator package, you must specify the allowed plugin types manually!