DV_10132020_EN_INTERFACES.BankResult IForeignExchangeApi.GetEcbRate(string currency, DateTime date) { var ECB = BankFactory.GetBank(BankFactory.SupportedBanks.ECB); IBankResult EcbResult = ECB.GetRateAsync(currency, date).Result; DV_10132020_EN_INTERFACES.BankResult result = new DV_10132020_EN_INTERFACES.BankResult(); result.BankName = EcbResult.BankName; result.ExchangeRate = EcbResult.ExchangeRate; result.RateDate = EcbResult.RateDate; result.HomeCurrency = EcbResult.HomeCurrency; return(result); }
public DV_10132020_EN_INTERFACES.BankResult GetBOCRate(string currency, DateTime date) { var BOC = BankFactory.GetBank(BankFactory.SupportedBanks.BOC); IBankResult BocResult = BOC.GetRateAsync(currency, date).Result; DV_10132020_EN_INTERFACES.BankResult result = new DV_10132020_EN_INTERFACES.BankResult(); result.BankName = BocResult.BankName; result.ExchangeRate = BocResult.ExchangeRate; result.RateDate = BocResult.RateDate; result.HomeCurrency = BocResult.HomeCurrency; return(result); }