internal MultiplexingFeedSource(RssFeedSettings feedSettings,
     ISyndicationFeedSource[] sourcesToMultiplex,
     Func<IEnumerable<SyndicationItem>, IEnumerable<SyndicationItem>> filter)
 {
     _feedSettings = feedSettings;
     _sourcesToMultiplex = sourcesToMultiplex;
     _filter = filter ?? (items => items);
 }
Example #2
0
        public SyndicationFeed Build(RssFeedSettings settings, SyndicationItem[] syndicationItems)
        {
            var feed = new SyndicationFeed(settings.Title, settings.Description, settings.FeedHomeUri, syndicationItems)
                       {
                           Id = settings.FeedId,
                           ImageUrl = new Uri(settings.ImageUrl),
                           Language = settings.Language,
                           Copyright = new TextSyndicationContent(settings.Copyright),
                           LastUpdatedTime = syndicationItems.FirstOrDefault().Coalesce(item => item.PublishDate, DateTimeOffset.MinValue),
                       };
            feed.Authors.Add(settings.Author);
            feed.Links.Add(new SyndicationLink(settings.FeedHomeUri));

            return feed;
        }
Example #3
0
 public MultiplexedBuilder WithRssSettings(RssFeedSettings feedSettings)
 {
     FeedSettings = feedSettings;
     return(this);
 }
Example #4
0
 public EmbeddedResourceBuilder WithRssSettings(RssFeedSettings feedSettings)
 {
     FeedSettings = feedSettings;
     return(this);
 }