Example #1
0
        private async void LoadExchangeRateList()
        {
            if (isExchangeRateListLoaded)
            {
                return;
            }

            if (queryDispatcher == null)
            {
                return;
            }

            List <ExchangeRateModel> exchangeRates = await queryDispatcher.QueryAsync(new ListTargetCurrencyExchangeRates(UniqueCode));

            if (exchangeRates == null)
            {
                return;
            }

            ExchangeRates.AddRange(exchangeRates);
            ExchangeRates.SortDescending(e => e.ValidFrom);
            RaisePropertyChanged(nameof(ExchangeRates));

            isExchangeRateListLoaded = true;
        }