/// <summary> /// Executes the load laps command. /// </summary> async Task ExecuteLoadLapsCommand() { if (IsBusy) { return; } IsBusy = true; try { var laps = await App.RestService.LapsByRaceAndDriverAsync(Race.Season, Race.Round, Driver.Id); Race.Laps = laps.Laps; Laps.Clear(); foreach (var l in laps.Laps) { Laps.Add(l); } } catch (Exception ex) { Debug.WriteLine(ex); } finally { IsBusy = false; } }