private void UpdateBlogPosts(Task<Post[]> t) { t.PropagateExceptions(); foreach (var p in t.Result) { Posts.Add(new Entry { Key = p.title, Value = p }); } var topPost = Posts.FirstOrDefault(); if (topPost != null) CurrentPost = topPost; }
private void UpdateBlogList(Task<BlogInfo[]> t) { t.PropagateExceptions(); var newAPIBlogs = new ObservableCollection<FetchedBlogInfo>(); foreach (var blogInfo in t.Result) { newAPIBlogs.Add(new FetchedBlogInfo { Name = blogInfo.blogName, BlogInfo = blogInfo }); } APIBlogs = newAPIBlogs; }
private void UpdateBlogPosts(Task<Post[]> t) { t.PropagateExceptions(); foreach (var p in t.Result) { Posts.Add(new Entry { Key = p.title, Value = p }); } }