Example #1
0
        public ExchangeRatesCache(IHaveConfigurations configuration, IRetrieveExchangeRates exchangeRatesRetriever)
        {
            _configuration          = configuration;
            _exchangeRatesRetriever = exchangeRatesRetriever;

            _cache = new Dictionary <Currency, IAmExchangeRate>();
        }
Example #2
0
 public ExchangeRatesRetriever(IHaveConfigurations configuration, IHttpClientFactory clientFactory)
 {
     _ratesApiUrl   = new Uri($"{configuration.RatesApiBaseUrl}/exchangerates/api/latest/");
     _clientFactory = clientFactory;
 }