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;
         }
     }
 }
Example #2
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;
         }
     }
 }