Files
mic-check/src/api/MicCheck.Api/Webhooks/DependencyRegistration.cs
James Wampler 7b51100ab6
All checks were successful
CI / build-and-push (push) Successful in 45s
CI / deploy-qa (push) Has been skipped
CI / smoke-qa (push) Has been skipped
Split Program.cs DI registrations into per-namespace DependencyRegistration classes
Each root namespace (Audit, Common, Data, Environments, Features/Usage,
Identities, Organizations, Projects, Segments, Users, Webhooks) gets its
own static DependencyRegistration class exposing an Add<Name>Services
extension method, so Program.cs just wires them together instead of
listing every registration inline.
2026-07-05 22:39:52 -07:00

18 lines
621 B
C#

namespace MicCheck.Api.Webhooks;
public static class DependencyRegistration
{
public static IServiceCollection AddWebhooksServices(this IServiceCollection services)
{
services.AddScoped<WebhookService>();
services.AddScoped<WebhookDispatcher>();
services.AddSingleton<WebhookQueue>();
services.AddHostedService<WebhookBackgroundService>();
services.AddHostedService<WebhookRetryBackgroundService>();
services.AddHttpClient("Webhooks", client =>
client.DefaultRequestHeaders.Add("User-Agent", "MicCheck-Webhook/1.0"));
return services;
}
}