2026-04-14 16:27:27 +10:00
|
|
|
|
using PARR.Core;
|
2025-08-14 15:20:04 +10:00
|
|
|
|
using PARR.DAL;
|
2026-04-14 16:27:27 +10:00
|
|
|
|
using PARR.Infrastructure;
|
2025-08-14 15:20:04 +10:00
|
|
|
|
using PARR.TemplateGeneratorWorker.Services;
|
|
|
|
|
|
using PARR.TemplateGeneratorWorker.Settings;
|
|
|
|
|
|
|
|
|
|
|
|
namespace PARR.TemplateGeneratorWorker
|
|
|
|
|
|
{
|
|
|
|
|
|
public static class TemplateGeneratorWorkerInstaller
|
|
|
|
|
|
{
|
|
|
|
|
|
public static void InstallTemplateGeneratorWorkerSerivces(this IServiceCollection services, IConfiguration configuration)
|
|
|
|
|
|
{
|
2026-04-30 10:35:31 +10:00
|
|
|
|
services.AddDalServices(configuration);
|
2026-04-14 16:27:27 +10:00
|
|
|
|
services.AddCoreServices(configuration);
|
|
|
|
|
|
services.AddInfrastructureServices(configuration);
|
2025-08-14 15:20:04 +10:00
|
|
|
|
|
|
|
|
|
|
var mqSettings = new MqSettings();
|
|
|
|
|
|
configuration.GetSection(nameof(MqSettings)).Bind(mqSettings);
|
|
|
|
|
|
services.AddSingleton(mqSettings);
|
|
|
|
|
|
|
2025-08-19 11:13:56 +10:00
|
|
|
|
services.AddTransient<ITemplateGenerator, TemplateGenerator>();
|
2025-08-14 15:20:04 +10:00
|
|
|
|
services.AddTransient<IValidatorService, ValidatorService>();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static IConfigurationBuilder AddTemplateGeneratorWorkerConfigurations(this IConfigurationBuilder builder, IServiceCollection services)
|
|
|
|
|
|
{
|
|
|
|
|
|
builder.AddDalConfigurations(services);
|
|
|
|
|
|
|
|
|
|
|
|
return builder;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void AddTemplateGeneratorWorkerSettings(this IServiceCollection services, IConfiguration configuration)
|
|
|
|
|
|
{
|
|
|
|
|
|
services.AddDallSettings(configuration);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|