async Task ExecuteLoadItemsCommand() { if (IsBusy) { return; } IsBusy = true; try { Notes.Clear(); var notes = await PluralsightDataStore.GetNotesAsync(); foreach (var note in notes) { Notes.Add(note); } } catch (Exception ex) { Debug.WriteLine(ex); } finally { IsBusy = false; } }
async Task ExecuteLoadItemsCommand() { if (IsBusy) { return; } IsBusy = true; try { Notes.Clear(); // this gets complicated // PluralSightDataStore is a (member ...property? ) // created in BaseViewModel via DependencyService // it is of type IPluralSightDataStore var notes = await PluralsightDataStore.GetNotesAsync(); foreach (var note in notes) { Notes.Add(note); } } catch (Exception ex) { Debug.WriteLine(ex); } finally { IsBusy = false; } }