Example #1
0
 public Startup(IConfiguration configuration)
 {
     Configuration   = configuration;
     _exchangeHelper = new ExchangeHelper();
     _exchange       = new Exchange(_exchangeHelper);
     _apiConnections = new ApiConnections()
     {
         UriString            = _uriString,
         RequestUriAllRates   = _requestUriAllRates,
         RequestUriSingleRate = _requestUriSingleRate
     };
 }
Example #2
0
 public ExchangeController(IExchange exchange,
                           Dictionary <string, int> codesForExchangeRates,
                           ExchangeDbEntities context,
                           IConversionDao conversionDao,
                           ICurrencyDao currencyDao,
                           ApiConnections apiConnections,
                           ExchangeHelper exchangeHelper)
 {
     _exchange = exchange;
     _codesForExchangeRates = codesForExchangeRates;
     _context        = context;
     _conversionDao  = conversionDao;
     _currencyDao    = currencyDao;
     _apiConnections = apiConnections;
     _exchangeHelper = exchangeHelper;
 }