feat(templateUpdater): основная логика + cicd
This commit is contained in:
37
PARR.TemplateUpdater/TemplateUpdaterInstaller.cs
Normal file
37
PARR.TemplateUpdater/TemplateUpdaterInstaller.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using PARR.BLL;
|
||||
using PARR.DAL;
|
||||
using PARR.TemplateUpdater.Services;
|
||||
using PARR.TemplateUpdater.Settings;
|
||||
|
||||
namespace PARR.TemplateUpdater
|
||||
{
|
||||
public static class TemplateUpdaterInstaller
|
||||
{
|
||||
public static void InstallTemplateUpdaterServices(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<ITemplateUpdater, TemplateUpdater>();
|
||||
services.AddTransient<ITemplateUpdaterService, TemplateUpdaterService>();
|
||||
}
|
||||
|
||||
public static IConfigurationBuilder AddTemplateUpdaterConfigurations(this IConfigurationBuilder builder, IServiceCollection services)
|
||||
{
|
||||
builder.AddDalConfigurations(services);
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static void AddTemplateUpdaterSettings(this IServiceCollection services, IConfiguration configuration)
|
||||
{
|
||||
services.AddDallSettings(configuration);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user