Files
parr_api/PARR.EsppTemplateSync/EsppTemplateSyncInstaller.cs

29 lines
1.1 KiB
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.AddAutoMapper(AppDomain.CurrentDomain.GetAssemblies());
//services.AddTransient<ITemplateSyncer, TemplateFileSyncer>();
services.AddTransient<ITemplateSyncer, TemplateMQSyncer>();
services.AddTransient<IParserService, ParserService>();
services.AddTransient<IManager, Manager>();
}
}
}