コード例 #1
0
        /// <summary>
        /// Aktuális árfolyam lekérdezése
        /// </summary>
        public static async Task <decimal> GetCurrentExchangeRate(string currency)
        {
            MNBArfolyamServiceSoapClient client = new MNBArfolyamServiceSoapClient();

            await client.OpenAsync();

            GetCurrentExchangeRatesResponse response = await client.GetCurrentExchangeRatesAsync(new GetCurrentExchangeRatesRequestBody());

            await client.CloseAsync();

            return(GetCurrentExchangeRateFromString(currency, response.GetCurrentExchangeRatesResponse1.GetCurrentExchangeRatesResult));
        }