Пример #1
0
        public async Task GetRateTest()
        {
            IGlobalRates gr    = new GlobalRates();
            decimal      coeff = await gr.GetRateAsync(Currency.USD, Currency.EUR);

            Assert.IsTrue(coeff > 0);
        }
Пример #2
0
        private void CommissionGet(object obj, Money m)
        {
            IGlobalRates   gr   = new GlobalRates();
            Task <decimal> task = gr.GetRateAsync(m.Curr, Money.Curr);

            Money.AdjustExchangeRate(m.Curr, Money.Curr, task.Result);
            Money.AddMoney(m);
            m.SubtractMoney(m);
        }