Files
tnsu-approval-route/backend/Tnsu.ApprovalRoute.Application/ApplicationServiceCollectionExtensions.cs
T
gorbenko.pavel 1bf8d4ca11
Tests / frontend-test (push) Successful in 45s
Tests / backend-test (push) Successful in 1m43s
Feature/request manage server load (#22)
Co-authored-by: gorbenko.pavel <gorbenko.pavel@tansu.kz>
Reviewed-on: http://git.tnsu.kz/gorbenko.pavel/tnsu-approval-route/pulls/22
2026-09-25 06:30:59 +00:00

37 lines
1.5 KiB
C#

using System.Reflection;
using FluentValidation;
using Microsoft.Extensions.DependencyInjection;
using Tnsu.ApprovalRoute.Application.Approvals;
using Tnsu.ApprovalRoute.Application.Reminders;
using Tnsu.ApprovalRoute.Application.ListPartitioning;
using Tnsu.ApprovalRoute.Application.Reports;
using Tnsu.ApprovalRoute.Application.RequestManage;
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<RequestManageService>();
services.AddScoped<ListPartitionRegistry>();
services.AddScoped<ListPartitionService>();
// Джоба резолвится Hangfire'ом из scope на каждое выполнение.
services.AddScoped<CreateNextListPartitionJob>();
services.AddScoped<AutoApproveService>();
services.AddScoped<AutoApproveJob>();
services.AddScoped<VacancyReportService>();
services.AddScoped<TemplateRouteService>();
services.AddScoped<TemplateRouteStepService>();
services.AddValidatorsFromAssembly(Assembly.GetExecutingAssembly());
return services;
}
}