28 lines
1018 B
C#
28 lines
1018 B
C#
using Microsoft.Extensions.Configuration;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using PARR.BLL;
|
|
using PARR.DAL;
|
|
using PARR.EsppTemplateSync.Services;
|
|
using PARR.EsppTemplateSync.Settings;
|
|
|
|
namespace PARR.EsppTemplateSync
|
|
{
|
|
public static class EsppTemplateSyncInstaller
|
|
{
|
|
public static void InstallEsppTemplateSyncServices(this IServiceCollection services, IConfiguration configuration)
|
|
{
|
|
services.InstallBllServices(configuration);
|
|
services.InstallDalServices(configuration);
|
|
|
|
var globalSettings = new GlobalSettings();
|
|
configuration.GetSection(nameof(GlobalSettings)).Bind(globalSettings);
|
|
services.AddSingleton(globalSettings);
|
|
|
|
//services.AddTransient<ITemplateSyncer, TemplateFileSyncer>();
|
|
services.AddTransient<ITemplateSyncer, TemplateMQSyncer>();
|
|
services.AddTransient<IParserService, ParserService>();
|
|
services.AddTransient<IManager, Manager>();
|
|
}
|
|
}
|
|
}
|