Exemplo n.º 1
0
 private static void ProcessSyndication <T>(Action <IEnumerable <T> > callback, OpenReadCompletedEventArgs args) where T : FeedItem, new()
 {
     using (var reader = XmlReader.Create(args.Result))
     {
         var formatter = new Rss10FeedFormatter();
         formatter.ReadFrom(reader);
         SyndicationFeed feed  = formatter.Feed;
         var             items = feed.Parse <T>();
         callback(items);
     }
 }