Пример #1
0
        public async override Task InitializeAsync(INavigation navigation)
        {
            await base.InitializeAsync(navigation);

            Foods.Clear();
            Foods.AddRange(await DataStore.FoodEntries.Get());
        }
        public async void ExecuteLoadFoodsCommand()
        {
            if (IsBusy)
            {
                return;
            }

            IsBusy = true;
            LoadFoodsCommand.ChangeCanExecute();

            Foods.Clear();
            Foods.AddRange(await _DataClient.GetFoodsAsync());

            IsBusy = false;
            LoadFoodsCommand.ChangeCanExecute();
        }
Пример #3
0
 private void LoadDataAsync() => Task.Run(() => Foods.AddRange(_foodService.GetAll()));