GetStoreAsync() public method

public GetStoreAsync ( ) : Task>
return Task>
Beispiel #1
0
        protected override async void OnAppearing()
        {
            base.OnAppearing();

            try
            {
                var stores = await viewModel.GetStoreAsync();

                foreach (var store in stores)
                {
                    PickerStore.Items.Add(store.Name);
                }
            }
            catch (Exception ex) {
                Xamarin.Insights.Report(ex);
                DisplayAlert("Uh oh :(", "Unable to get locations, don't worry you can still submit feedback.", "OK");
            }
        }
Beispiel #2
0
        protected override async void OnAppearing()
        {
            base.OnAppearing();
            var showAlert = false;

            try
            {
                var stores = await viewModel.GetStoreAsync();

                //foreach(var store in stores)
                //PickerStore.Items.Add(store.Name);
            }
            catch (Exception ex)
            {
                showAlert = true;
            }
            if (showAlert)
            {
                await DisplayAlert("Uh oh :(", "Unable to get locations, don't worry you can still submit feedback.", "OK");
            }
        }