feat(esppScheduleSync): создан проект. Добавлена основная логика синхронизации. Docker
This commit is contained in:
37
PARR.EsppScheduleSync/EsppScheduleSyncInstaller.cs
Normal file
37
PARR.EsppScheduleSync/EsppScheduleSyncInstaller.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using PARR.BLL;
|
||||
using PARR.DAL;
|
||||
using PARR.EsppSync;
|
||||
using PARR.EsppScheduleSync.Domain;
|
||||
using PARR.EsppScheduleSync.Settings;
|
||||
|
||||
namespace PARR.EsppScheduleSync
|
||||
{
|
||||
public static class EsppScheduleSyncInstaller
|
||||
{
|
||||
public static void InstallEsppScheduleSyncServices(this IServiceCollection services, IConfiguration configuration)
|
||||
{
|
||||
services.InstallBllServices(configuration);
|
||||
services.InstallEsppSyncServices<EsppObjectSchedule>(configuration);
|
||||
|
||||
var globalSettings = new GlobalSettings();
|
||||
configuration.GetSection(nameof(GlobalSettings)).Bind(globalSettings);
|
||||
services.AddSingleton(globalSettings);
|
||||
|
||||
services.AddTransient<IScheduleSyncher, ScheduleSyncher>();
|
||||
}
|
||||
|
||||
public static IConfigurationBuilder AddEsppScheduleConfigurations(this IConfigurationBuilder builder, IServiceCollection services)
|
||||
{
|
||||
builder.AddDalConfigurations(services);
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static void AddEsppScheduleSettings(this IServiceCollection services, IConfiguration configuration)
|
||||
{
|
||||
services.AddDallSettings(configuration);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user