Files
tnsu-approval-route/backend/Tnsu.ApprovalRoute.Application/ApplicationServiceCollectionExtensions.cs
T
gorbenko.pavel 2a7130c37f
Tests / frontend-test (pull_request) Successful in 47s
Tests / backend-test (pull_request) Successful in 2m7s
джоба есть
2026-08-17 14:14:45 +05:00

30 lines
1.1 KiB
C#

using System.Reflection;
using FluentValidation;
using Microsoft.Extensions.DependencyInjection;
using Tnsu.ApprovalRoute.Application.Reminders;
using Tnsu.ApprovalRoute.Application.RequestTypeLists;
using Tnsu.ApprovalRoute.Application.RequestTypes;
using Tnsu.ApprovalRoute.Application.TemplateRoutes;
using Tnsu.ApprovalRoute.Application.TemplateRouteSteps;
namespace Tnsu.ApprovalRoute.Application;
public static class ApplicationServiceCollectionExtensions
{
public static IServiceCollection AddApprovalRouteApplication(this IServiceCollection services)
{
services.AddScoped<ReminderService>();
services.AddScoped<RequestTypeService>();
services.AddScoped<RequestTypeListRegistry>();
services.AddScoped<RequestTypeListService>();
// Джоба резолвится Hangfire'ом из scope на каждое выполнение.
services.AddScoped<CreateNextRequestTypeListJob>();
services.AddScoped<TemplateRouteService>();
services.AddScoped<TemplateRouteStepService>();
services.AddValidatorsFromAssembly(Assembly.GetExecutingAssembly());
return services;
}
}