public SecurityPriceSave(ILogger <SecurityPriceSave> logger, IMapper mapper, IAppRepository <string> appRepository, IHttpClientFactory clientFactory) { this.logger = logger; this.mapper = mapper; this.appRepository = appRepository; //SQS sqs = new AmazonSQSClient(RegionEndpoint.USEast1); queueUrlResponse = sqs.GetQueueUrlAsync(QueueName).Result; //HttpClient client = clientFactory.CreateClient(); //TDA apiKey = EnvHandler.GetApiKey(@"tdameritrade"); //API Gateway key isrKey = EnvHandler.GetApiKey(@"ISRApiHandler"); //Security list securityList = GetTickerList().Result; }
public static IServiceCollection AddMongoRepository(this IServiceCollection services) { var mongoURL = EnvHandler.GetApiKey("InvestDb"); services.AddSingleton <IAppRepository <string> >(r => new Repository <string>(mongoURL)); return(services); }
/// <summary> /// Initializes a new instance of the <see cref="ObtainFundamentals"/> class. /// </summary> /// <param name="logger">The logger.</param> /// <param name="resolveCompanyName">Name of the resolve company.</param> /// <param name="envHandler">The env handler.</param> /// <param name="connectionHandlerCF">The connection handler cf.</param> /// <param name="mapper">The mapper.</param> public ObtainFundamentals(ILogger <ObtainFundamentals> logger, ResolveCompanyName resolveCompanyName, EnvHandler envHandler, IDBConnectionHandler <PiotroskiScoreMd> connectionHandlerCF, IMapper mapper) { _logger = logger; _resolveCompanyName = resolveCompanyName; _envHandler = envHandler; _connectionHandlerCF = connectionHandlerCF; _mapper = mapper; _connectionHandlerCF.ConnectToDatabase("PiotroskiScore"); }
public static bool IsEnglish(this string inputString) { var envHandler = new EnvHandler(); var key = envHandler.GetApiKey(KeyForTraslator); string host = HostName; string route = RouteName; return(DetectTextRequest(key, host, route, inputString.TruncateAtWord(50))); }
public static void UseEnvActuator(IConfiguration configuration, IHostingEnvironment hostingEnvironment = null, ILoggerFactory loggerFactory = null) { var options = new EnvOptions(configuration); hostingEnvironment = hostingEnvironment ?? new DefaultHostingEnvironment("development"); var ep = new EnvEndpoint(options, configuration, hostingEnvironment, CreateLogger <EnvEndpoint>(loggerFactory)); var handler = new EnvHandler(ep, SecurityService, CreateLogger <EnvHandler>(loggerFactory)); ConfiguredHandlers.Add(handler); }
public ObtainFundamentals(ILogger <ObtainFundamentals> log, ObtainCompanyDetails obtainCompanyDetails, IDBConnectionHandler <PiotroskiScoreMd> connectionHandlerCF, EnvHandler envHandler) { _log = log; _obtainCompanyDetails = obtainCompanyDetails; _connectionHandlerCF = connectionHandlerCF; _envHandler = envHandler; _connectionHandlerCF.ConnectToDatabase("PiotroskiScore"); }
public ObtainGoodInvestments(ILogger <ObtainGoodInvestments> log, IDBConnectionHandler <PiotroskiScoreMd> connectionHandlerCF, IDBConnectionHandler <CompanyDetailMd> dbconCompany, EnvHandler envHandler) { _log = log; _ratingsConnectionHandler = connectionHandlerCF; _dbconCompany = dbconCompany; _envHandler = envHandler; _ratingsConnectionHandler.ConnectToDatabase("PiotroskiScore"); _dbconCompany.ConnectToDatabase("CompanyDetail"); }
public ResolveCompanyName(ILogger <ResolveCompanyName> logger, EnvHandler envHandler, IDBConnectionHandler <SecuritySymbolMd> connectionHandlerSS, IDBConnectionHandler <LastUpateCollectionMd> connectionHandlerLU, IMapper mapper) { _logger = logger; _envHandler = envHandler; _connectionHandlerSS = connectionHandlerSS; _connectionHandlerLU = connectionHandlerLU; _mapper = mapper; _connectionHandlerSS.ConnectToDatabase("SecuritySymbol"); _connectionHandlerLU.ConnectToDatabase("LastUpdate"); }
public ObtainGoodInvestments(ILogger <ObtainGoodInvestments> logger, IDBConnectionHandler <PiotroskiScoreMd> connectionHandlerCF, ResolveCompanyName resolveCompanyName, ObtainStockQuote obtainStockQuote, EnvHandler envHandler) { _logger = logger; _connectionHandlerCF = connectionHandlerCF; _envHandler = envHandler; _resolveCompanyName = resolveCompanyName; _obtainStockQuote = obtainStockQuote; _ = _connectionHandlerCF.ConnectToDatabase("PiotroskiScore"); }
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>(); }
public EvaluateSecurity( ILogger <EvaluateSecurity> logger, IMapper mapper, IAppRepository <string> appRepository, IHttpClientFactory clientFactory) { this.logger = logger; this.mapper = mapper; this.appRepository = appRepository; //HttpClient client = clientFactory.CreateClient(); client1 = clientFactory.CreateClient(); //API Gateway key IsrKey = EnvHandler.GetApiKey(@"ISRApiHandler"); simFinAPIKey = EnvHandler.GetApiKey(@"SimFinKey"); }
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(); }
public ObtainStockQuote(ILogger <ObtainStockQuote> log, ObtainCompanyDetails obtainCompanyDetails, EnvHandler envHandler) { _log = log; _obtainCompanyDetails = obtainCompanyDetails; _envHandler = envHandler; }
public ObtainCompanyDetails(ILogger <ObtainCompanyDetails> log, EnvHandler envHandler) { _log = log; _envHandler = envHandler; }
public ObtainMarketSummary(ILogger <ObtainMarketSummary> log, EnvHandler envHandler) { _log = log; _envHandler = envHandler; }
public ObtainNews(ILogger <ObtainNews> log, EnvHandler envHandler) { _log = log; _envHandler = envHandler; }
/// <summary> /// Initializes a new instance of the <see cref="ObtainStockQuote"/> class. /// </summary> /// <param name="logger">The logger.</param> /// <param name="resolveCompanyName">Name of the resolve company.</param> /// <param name="envHandler">The env handler.</param> public ObtainStockQuote(ILogger <ObtainStockQuote> logger, ResolveCompanyName resolveCompanyName, EnvHandler envHandler) { _logger = logger; _envHandler = envHandler; _resolveCompanyName = resolveCompanyName; }