2026-10-28 21:43:17 +01:00
|
|
|
using FluentValidation;
|
|
|
|
|
using Helpdesk.Application.Auth;
|
|
|
|
|
using Helpdesk.Application.Catalogs;
|
2026-11-18 18:32:59 +01:00
|
|
|
using Helpdesk.Application.Issues;
|
2026-11-18 18:40:53 +01:00
|
|
|
using Helpdesk.Application.Notifications;
|
2026-11-18 21:58:33 +01:00
|
|
|
using Helpdesk.Application.Proposals;
|
2026-10-28 21:43:17 +01:00
|
|
|
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>();
|
2026-11-18 18:40:53 +01:00
|
|
|
services.AddScoped<NotificationService>();
|
2026-11-18 21:58:33 +01:00
|
|
|
services.AddScoped<NotificationWriter>();
|
|
|
|
|
services.AddScoped<ProposalService>();
|
2026-10-28 21:43:17 +01:00
|
|
|
return services;
|
|
|
|
|
}
|
|
|
|
|
}
|