feat(templateMatcher): init. сделан воркер, контроллер. перенесена логика из TemplateTaskGenerator

This commit is contained in:
Mikhail Kuznetsov
2025-11-01 15:29:12 +10:00
parent e716d9649d
commit 2950d21a69
24 changed files with 584 additions and 3 deletions

View File

@@ -0,0 +1,39 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using PARR.BLL;
using PARR.DAL;
using PARR.TemplateMatcher.Services.Implemetaions;
using PARR.TemplateMatcher.Services.Interfaces;
using PARR.TemplateMatcher.Settings;
namespace PARR.TemplateMatcher
{
public static class TemplateMatcherInstaller
{
public static void InstallTemplateMatcherSerivces(this IServiceCollection services, IConfiguration configuration)
{
services.InstallBllServices(configuration);
services.InstallDalServices(configuration);
var mqSettings = new MqSettings();
configuration.GetSection(nameof(MqSettings)).Bind(mqSettings);
services.AddSingleton(mqSettings);
services.AddTransient<IMqTemplateMatcher, MqTemplateMatcher>();
services.AddTransient<IJobValidatorService, JobValidatorService>();
services.AddTransient<ITemplateMatcher, TemplateMatcher>();
}
public static IConfigurationBuilder AddTemplateMatcherConfigurations(this IConfigurationBuilder builder, IServiceCollection services)
{
builder.AddDalConfigurations(services);
return builder;
}
public static void AddTemplateMatcherSettings(this IServiceCollection services, IConfiguration configuration)
{
services.AddDallSettings(configuration);
}
}
}