2023-11-22 16:34:16 +10:00
|
|
|
|
using Microsoft.Extensions.Configuration;
|
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
2026-04-14 16:27:27 +10:00
|
|
|
|
using PARR.Core;
|
2023-11-22 16:34:16 +10:00
|
|
|
|
using PARR.DAL;
|
2026-03-03 10:19:59 +10:00
|
|
|
|
using PARR.EsppScheduleSync.Domain;
|
2023-11-22 16:34:16 +10:00
|
|
|
|
using PARR.EsppScheduleSync.Settings;
|
2026-02-17 16:27:10 +10:00
|
|
|
|
using PARR.EsppSync;
|
2026-04-14 16:27:27 +10:00
|
|
|
|
using PARR.Infrastructure;
|
2023-11-22 16:34:16 +10:00
|
|
|
|
|
|
|
|
|
|
namespace PARR.EsppScheduleSync
|
|
|
|
|
|
{
|
|
|
|
|
|
public static class EsppScheduleSyncInstaller
|
|
|
|
|
|
{
|
|
|
|
|
|
public static void InstallEsppScheduleSyncServices(this IServiceCollection services, IConfiguration configuration)
|
|
|
|
|
|
{
|
|
|
|
|
|
services.InstallEsppSyncServices<EsppObjectSchedule>(configuration);
|
2026-04-14 16:27:27 +10:00
|
|
|
|
services.AddCoreServices(configuration);
|
|
|
|
|
|
services.AddInfrastructureServices(configuration);
|
2023-11-22 16:34:16 +10:00
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|