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

35 lines
1.3 KiB
C#

using FluentValidation;
using Helpdesk.Application.Auth;
using Helpdesk.Application.Catalogs;
using Helpdesk.Application.Issues;
using Helpdesk.Application.Notifications;
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>();
services.AddScoped<IssueService>();
services.AddScoped<NotificationService>();
services.AddScoped<NotificationDeliveryService>();
services.AddScoped<NotificationWriter>();
services.AddScoped<PushDeviceService>();
services.AddScoped<ProposalService>();
services.AddScoped<StatisticsService>();
return services;
}
}