helper class that provides memory and disk caching of the downloaded feeds
Exemple #1
0
        protected static T Load <T>(System.Uri url) where T : RssDocumentBase
        {
            if (url == null)
            {
                throw new ArgumentNullException("url");
            }

            // resolve app-relative URLs
            string rssUrl = RssXmlHelper.ResolveAppRelativeLinkToUrl(url.ToString());

            // download the feed
            using (Stream cachedXml = DownloadManager.GetFeed(rssUrl))
            {
                using (XmlTextReader reader = new XmlTextReader(cachedXml))
                {
                    T rss = Load <T>(reader);

                    //// remember the url
                    rss.Url = rssUrl;

                    return(rss);
                }
            }
        }