internal void RefreshList() { PartnersList.Clear(); foreach (var item in context.GetPartner()) { PartnersList.Add(new Partner(item)); } }
private async Task ExecuteLoadItemsCommand() { if (IsBusy) { return; } IsBusy = true; try { PartnersList.Clear(); var items = await _contentRepository.GetContent(StaticData.DevTalkWeb); var partners = ExtensionMethods.GetPartners(items); foreach (var item in partners) { PartnersList.Add(item); } } catch (Exception ex) { var page = new ContentPage(); var result = page.DisplayAlert("Error", "Unable to load partners content. " + ex.Message, "OK"); Insights.Report(ex, new Dictionary <string, string> { { "Error", "Unable to load partners content." }, { "Message", ex.Message }, { "Result", result.ToString() } }); } IsBusy = false; }