public async void Login_Clicked(object sender, EventArgs e) { await DoLogin(async result => { if (await _api.Execute(new VerifyUserAction())) { Application.Current.MainPage = new AppShell(); } }); }
protected override async void OnQueryChanged(string oldValue, string newValue) { base.OnQueryChanged(oldValue, newValue); if (string.IsNullOrWhiteSpace(newValue) || newValue.Length <= 2) { ItemsSource = null; } else { ItemsSource = await _service.Execute(new SearchForGameAction(newValue)); } }
public async Task LoadCopies() { IsBusy = true; var copies = await _api.Execute(new GetCopiesAction(Id)); Copies.Clear(); foreach (var copy in copies) { Copies.Add(copy); } IsBusy = false; }
private void LoadStatistics() { Task.Run(async() => { var statistics = await _api.Execute(new GetPlatformStatisticsAction()); Statistics.Clear(); foreach (var statistic in statistics) { Statistics.Add(statistic); } }); }
public Task <IEnumerable <GameModel> > DoAsync(APIActionService service) { return(service.Execute(new SearchForGameAction(string.Empty, 10))); }