private static void ConfigureServices(ServiceCollection serviceCollection) { SetApplicationEnvVar.SetEnvVariablesFromS3(); var mongoURL = EnvHandler.GetApiKey("InvestDb"); serviceCollection.AddScoped <IAppRepository <string> >(r => new Repository <string>(mongoURL)); serviceCollection.AddAutoMapper(typeof(AMProfile)); MapperConfiguration config = new MapperConfiguration(cfg => { cfg.AddProfile <AMProfile>(); }); config.AssertConfigurationIsValid(); serviceCollection.AddSingleton <IReadSCFile, ReadSCFile>(); }
private void ConfigureServices(IServiceCollection serviceCollection) { SetApplicationEnvVar.SetEnvVariablesFromS3(); var mongoURL = EnvHandler.GetApiKey("InvestDb"); serviceCollection.AddScoped <IAppRepository <string> >(r => new Repository <string>(mongoURL)); serviceCollection.AddAutoMapper(typeof(AMProfile)); MapperConfiguration config = new MapperConfiguration(cfg => { cfg.AddProfile <AMProfile>(); }); config.AssertConfigurationIsValid(); serviceCollection.AddLogging(c => c.AddNLog()) .Configure <LoggerFilterOptions>(o => o.MinLevel = LogLevel.Debug) .AddTransient(typeof(ILogger <>), typeof(Logger <>)); serviceCollection.AddScoped <IPopulateSQS, PopulateSQS>(); serviceCollection.AddScoped <ISecurityPriceSave, SecurityPriceSave>(); serviceCollection.AddScoped <IEvaluateSecurity, EvaluateSecurity>(); serviceCollection.AddHttpClient(); }