Пример #1
0
        /// <summary>
        /// Exchange Rates at
        /// </summary>
        /// <param name="at">DateTime of Exchange Rates</param>
        /// <returns>Exchange Rates</returns>
        public static Task <IDictionary <CurrencyInfo, decimal> > ExchangeRatesAsync(this IExchangeOffice office, DateTime at)
        {
            if (null == office)
            {
                throw new ArgumentNullException(nameof(office));
            }

            return(office.ExchangeRatesAsync(at, CancellationToken.None));
        }
Пример #2
0
        /// <summary>
        /// Exchange Rates at
        /// </summary>
        /// <param name="at">DateTime of Exchange Rates</param>
        /// <returns>Exchange Rates</returns>
        public static IDictionary <CurrencyInfo, decimal> ExchangeRates(this IExchangeOffice office, DateTime at)
        {
            if (office is null)
            {
                throw new ArgumentNullException(nameof(office));
            }

            return(office.ExchangeRatesAsync(at, CancellationToken.None).GetAwaiter().GetResult());
        }