private async void DeleteFeed(RssFeed feed) { var result = await feedService.DeleteFeed(feed); if (result) { feeds.Remove(feed); } }
public async Task<bool> DeleteFeed(RssFeed feed) { try { await feedTable.DeleteAsync(feed); return true; } catch (Exception ex) { // audit exception return false; } }
public async Task<RssFeed> InsertFeed(string Title, string Link) { try { var feed = new RssFeed() { Title = Title, Link = Link, }; feed.Items = await FetchFeedItemsForUrl(Link); await feedTable.InsertAsync(feed); return feed; } catch (Exception ex) { // audit error return null; } }
public async Task<RssFeed> InsertFeed(string Title, string Link) { var feed = new RssFeed() { Title = Title, Link = Link, Id = 99, Items = new List<RssItem>() { new RssItem() { Id = 31, Title = "New RssItem 1", Summary = "New RssItem 1 Summary", Unread = true, PubDate = DateTimeOffset.Now, }, new RssItem() { Id = 32, Title = "New RssItem 2", Summary = "New RssItem 2 Summary", Unread = true, PubDate = DateTimeOffset.Now, }, }, }; return feed; }
public async Task<bool> DeleteFeed(RssFeed feed) { return true; }
private async void ShowItemsForFeed(RssFeed feed) { if (feed == null) return; FeedItems.ItemsSource = feed.Items; }