BlogEngine.Core.SyndicationGenerator.WriteRssChannel C# (CSharp) Method

WriteRssChannel() private method

Writes the RSS channel element information to the specified XmlWriter using the supplied collection.
private WriteRssChannel ( XmlWriter writer, IEnumerable publishables, string title ) : void
writer System.Xml.XmlWriter /// The to write channel element information to. ///
publishables IEnumerable /// The collection of objects used to generate syndication content. ///
title string /// The title of the RSS channel. ///
return void
        private void WriteRssChannel(XmlWriter writer, IEnumerable<IPublishable> publishables, string title)
        {
            writer.WriteStartElement("channel");

            writer.WriteElementString("title", title);
            writer.WriteElementString("description", this.Settings.Description);
            writer.WriteElementString("link", Utils.AbsoluteWebRoot.ToString());

            // ------------------------------------------------------------
            // Write common/shared channel elements
            // ------------------------------------------------------------
            this.WriteRssChannelCommonElements(writer);

            foreach (var publishable in publishables.Where(publishable => publishable.IsVisible))
            {
                WriteRssItem(writer, publishable);
            }

            writer.WriteEndElement();
        }