e2b6227015
Co-authored-by: gorbenko.pavel <gorbenko.pavel@tansu.kz> Reviewed-on: http://git.tnsu.kz/gorbenko.pavel/tnsu-approval-route/pulls/20
32 lines
1.2 KiB
C#
32 lines
1.2 KiB
C#
using System.Reflection;
|
|
using FluentValidation;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Tnsu.ApprovalRoute.Application.Reminders;
|
|
using Tnsu.ApprovalRoute.Application.ListPartitioning;
|
|
using Tnsu.ApprovalRoute.Application.Reports;
|
|
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<ListPartitionRegistry>();
|
|
services.AddScoped<ListPartitionService>();
|
|
// Джоба резолвится Hangfire'ом из scope на каждое выполнение.
|
|
services.AddScoped<CreateNextListPartitionJob>();
|
|
services.AddScoped<VacancyReportService>();
|
|
services.AddScoped<TemplateRouteService>();
|
|
services.AddScoped<TemplateRouteStepService>();
|
|
|
|
services.AddValidatorsFromAssembly(Assembly.GetExecutingAssembly());
|
|
|
|
return services;
|
|
}
|
|
}
|