Esempio n. 1
0
 public Feed GetRssFeed(string feedUrl)
 {
     var rssFeeder = new RssFeeder(feedUrl);
     var rssItems = rssFeeder.GetRssFeed();
     var result = MapFeed(rssItems);
     return result;
 }
Esempio n. 2
0
 public Feed GetRssFeed(string feedUrl, string category)
 {
     var rssFeeder = new RssFeeder(feedUrl);
     var feed = rssFeeder.GetRssFeed();
     var mappedFeed = MapFeed(feed);
     mappedFeed.Items = mappedFeed.Items.Where(i => i.Category == category).ToList();
     return mappedFeed;
 }
Esempio n. 3
0
 private List<FeedItem> MapItems(IEnumerable<BaseFeedItem> rssItem)
 {
     var feeder = new RssFeeder();
     return (from i in rssItem
             select new FeedItem
             {
                 Title = i.Title,
                 Content = i.Content,
                 Id = i.Link.Substring(43, 5),
                 Category = i.Categories.FirstOrDefault() ?? "News",
                 IsRead = feeder.GetIsRead(i.Link.Substring(43, 5))
             }).ToList();
 }