private static DateTime GetPublishedDate(RssItem item) { if (item.PublicationDate == DateTime.MinValue && item.HasExtensions) { var ext = item.FindExtension(DublinCoreElementSetSyndicationExtension.MatchByType) as DublinCoreElementSetSyndicationExtension; if (ext != null) { return ext.Context.Date; } } return item.PublicationDate; }
private string GetRssAuthors(RssItem item) { var dcExtension = item.FindExtension<DublinCoreElementSetSyndicationExtension>(); return dcExtension != null ? dcExtension.Context.Creator : String.Empty; }
private static string GetRssContent(RssItem item) { var contentExtension = item.FindExtension<SiteSummaryContentSyndicationExtension>(); return contentExtension != null ? contentExtension.Context.Encoded : item.Description; }
private static IEnumerable<string> GetPodcastsFromExtensions(RssItem item) { if (item.HasExtensions) { var extension = item.FindExtension(YahooMediaSyndicationExtension.MatchByType) as YahooMediaSyndicationExtension; if (extension != null) { return from c in extension.Context.Contents let url = GetPodcastUrl(c.Url) where ContainsPodcastExtension(url) select url; } } return Enumerable.Empty<string>(); }