static void Main(string[] args) { try { Console.Title = "Daily Exchange Rate Processing - Batch"; var container = GetIocContainer(); IForexService _forexService = container.Resolve <IForexService>(); Console.WriteLine("Starting batch"); var data = _forexService.SyncLatestExchangeRatesInDB(); Console.WriteLine("Processing ended"); if (data) { Console.WriteLine("Sync successed"); } else { Console.WriteLine("Nothing Synced"); } } catch (Exception ex) { Console.WriteLine("Fatal error: " + ex.Message); Console.ReadKey(); } }
public AlphaVantageServiceFactory() { _httpClient = new HttpClient(); var service = new AlphaVantageService(_httpClient, AppSettings, CacheService); Forex = service; }
public GetGroupTotalQueryHandler(IUserCacheService cacheService, IGroupRepository groupRepository, ITransactionRepository transactionRepository, ICurrencyRepository currencyRepository, IForexService forexService) : base(cacheService) { _groupRepository = groupRepository; _transactionRepository = transactionRepository; _currencyRepository = currencyRepository; _forexService = forexService; cacheService.SetSlidingExpiration(TimeSpan.FromMinutes(10)); }
public GetAssetsTotalQueryHandler(IUserCacheService cacheService, IAssetRepository assetRepository, ITransactionRepository transactionRepository, ICurrencyRepository currencyRepository, IForexService forexService, IMapper mapper) : base(cacheService) { _assetRepository = assetRepository; _transactionRepository = transactionRepository; _currencyRepository = currencyRepository; _forexService = forexService; _mapper = mapper; cacheService.SetSlidingExpiration(TimeSpan.FromMinutes(10)); }
public GetAssetGroupedTransactionsQueryHandler(IUserCacheService cacheService, IAssetRepository assetRepository, ITransactionRepository transactionRepository, IForexService forexService, IUserRepository userRepository, ICurrencyRepository currencyRepository, IDefaults defaults, IMapper mapper) : base(cacheService) { _assetRepository = assetRepository; _transactionRepository = transactionRepository; _forexService = forexService; _userRepository = userRepository; _currencyRepository = currencyRepository; _defaults = defaults; _mapper = mapper; cacheService.SetSlidingExpiration(TimeSpan.FromMinutes(10)); }
public Application(IForexService forexService) { _forexService = forexService; }
public CurrencyController(IForexService forexService) { _forexService = forexService; }
public ForexController(IFixerService fixerService, IForexService forexService) { _fixerService = fixerService; _forexService = forexService; }
public ForexServiceClient(ForexServiceClientOptions options) { this._options = options ?? throw new ArgumentNullException(nameof(options)); this._forexService = ServiceProxy.Create <IForexService>(options.ForexServiceUrl); }
public CurrencyManager(IForexService forexService) { _forexService = forexService; Initialize(); }
public CryptoController(ICryptoService cryptoService, IForexService forexService) { this.cryptoService = cryptoService; this.forexService = forexService; }
public ForexController(IForexService forexService) { _forexService = forexService; }
public CryptoController(IHttpContextAccessor httpContextAccessor, ICryptoService cryptoService, IForexService forexService, ICryptoTickerRepository cryptoTickerRepository) : base(httpContextAccessor) { this.cryptoService = cryptoService; this.forexService = forexService; this.cryptoTickerRepository = cryptoTickerRepository; }
public Application(IForexService forexService) { _forexService = forexService; }
public ComodityController(IHttpContextAccessor httpContextAccessor, IComodityService comodityService, IForexService forexService) : base(httpContextAccessor) { this.comodityService = comodityService; this.forexService = forexService; }