コード例 #1
0
 public void Refresh() {
     lock (this) {
         try {
             using(WebClient client = new WebClient())
             using (XmlReader reader = new SyndicationFeedXmlReader(client.OpenRead(url)))
             {
                 feed = SyndicationFeed.Load(reader);
                 children = GetChildren(feed);
             }
         } catch (Exception ex) {
             Debug.Assert(false, "Failed to update podcast");
             Logger.ReportException("Podcast update failed.", ex);
             throw;
         }
     }
 }
コード例 #2
0
ファイル: RSSFeed.cs プロジェクト: nickmayer/mediabrowser
 public void Refresh()
 {
     lock (this) {
         try {
             using (WebClient client = new WebClient())
                 using (XmlReader reader = new SyndicationFeedXmlReader(client.OpenRead(url)))
                 {
                     feed     = SyndicationFeed.Load(reader);
                     children = GetChildren(feed);
                 }
         } catch (Exception ex) {
             Debug.Assert(false, "Failed to update podcast");
             Logger.ReportException("Podcast update failed.", ex);
             throw;
         }
     }
 }