示例#1
0
 private async void GetCurrencies()
 {
     try
     {
         CurrencieProgresRing.IsActive = true;
         this.ViewModel.Currencies.Clear();
         var res = WebServiceConsumer.GetCurrency(GetApiAddress(), () => { });
         await res.ContinueWith((t) =>
         {
             this.HandleResults(res.Result);
             this.OnDataComplete();
         }, TaskScheduler.FromCurrentSynchronizationContext());
     }
     catch (AggregateException aex)
     {
         this.ViewModel.SetErrorAlert();
     }
     catch (Exception ex)
     {
         this.ViewModel.SetErrorAlert();
     }
 }