public List<RssItem> GetRssItemsFromFeed(string strFeedLocation) { List<RssItem> lstResult = new List<RssItem>(); XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(strFeedLocation); XmlNodeList nodeLst = xmlDoc.SelectNodes("//item"); foreach (XmlNode node in nodeLst) { RssItem rssItem = new RssItem(); rssItem.Title = node.SelectSingleNode("title").InnerText; rssItem.Description = node.SelectSingleNode("description").InnerText; rssItem.Link = node.SelectSingleNode("link").InnerText; rssItem.Guid = node.SelectSingleNode("guid").InnerText; lstResult.Add(rssItem); } return lstResult; }
/// <summary> /// Mark a RssItem as read. /// </summary> /// <param name="rssItem">The RssItem</param> public void MarkRssItemAsRead(RssItem rssItem) { _lstCacheRssItems.Add(rssItem.Guid); _fileController.AppendTextToFile(PathGuidCache, rssItem.Guid); }