Files
NTBug/backend/src/Helpdesk.Application/DependencyInjection.cs
T

32 lines
1.2 KiB
C#
Raw Normal View History

using FluentValidation;
using Helpdesk.Application.Auth;
using Helpdesk.Application.Catalogs;
2026-11-18 18:32:59 +01:00
using Helpdesk.Application.Issues;
using Helpdesk.Application.Notifications;
2026-11-18 21:58:33 +01:00
using Helpdesk.Application.Proposals;
using Helpdesk.Application.Statistics;
using Helpdesk.Application.Users;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
namespace Helpdesk.Application;
public static class DependencyInjection
{
public static IServiceCollection AddApplication(this IServiceCollection services, IConfiguration configuration)
{
services.Configure<RegistrationOptions>(configuration.GetSection(RegistrationOptions.Section));
services.AddValidatorsFromAssembly(typeof(DependencyInjection).Assembly, includeInternalTypes: true);
services.AddScoped<TokenRevocationService>();
services.AddScoped<AuthService>();
services.AddScoped<UserService>();
services.AddScoped<CatalogService>();
2026-11-18 18:32:59 +01:00
services.AddScoped<IssueService>();
services.AddScoped<NotificationService>();
2026-11-18 21:58:33 +01:00
services.AddScoped<NotificationWriter>();
services.AddScoped<ProposalService>();
services.AddScoped<StatisticsService>();
return services;
}
}