//============================================================
// PRIVATE ATOM METHODS
//============================================================
#region WriteAtomContent(XmlWriter writer, List<IPublishable> publishables)
/// <summary>
/// Writes the Atom feed element information to the specified <see cref="XmlWriter"/> using the supplied collection.
/// </summary>
/// <param name="writer">The <see cref="XmlWriter"/> to write channel element information to.</param>
/// <param name="publishables">The collection of <see cref="IPublishable"/> objects used to generate syndication content.</param>
/// <param name="title">The title of the ATOM content.</param>
private void WriteAtomContent(XmlWriter writer, List <IPublishable> publishables, string title)
{
//------------------------------------------------------------
// Write required feed elements
//------------------------------------------------------------
writer.WriteElementString("id", Utils.AbsoluteWebRoot.ToString());
writer.WriteElementString("title", title);
writer.WriteElementString("updated", (publishables.Count > 0) ? SyndicationGenerator.ToW3CDateTime(publishables[0].DateModified.ToUniversalTime()) : SyndicationGenerator.ToW3CDateTime(DateTime.UtcNow));
//------------------------------------------------------------
// Write recommended feed elements
//------------------------------------------------------------
writer.WriteStartElement("link");
writer.WriteAttributeString("href", Utils.AbsoluteWebRoot.ToString());
writer.WriteEndElement();
writer.WriteStartElement("link");
writer.WriteAttributeString("rel", "self");
writer.WriteAttributeString("href", Utils.AbsoluteWebRoot + "syndication.axd?format=atom");
writer.WriteEndElement();
//writer.WriteStartElement("link");
//writer.WriteAttributeString("rel", "alternate");
//writer.WriteAttributeString("href", Utils.FeedUrl.ToString());
//writer.WriteEndElement();
//------------------------------------------------------------
// Write optional feed elements
//------------------------------------------------------------
writer.WriteElementString("subtitle", this.Settings.Description);
//------------------------------------------------------------
// Write common/shared feed elements
//------------------------------------------------------------
this.WriteAtomContentCommonElements(writer);
foreach (IPublishable publishable in publishables)
{
//------------------------------------------------------------
// Skip publishable content if it is not visible
//------------------------------------------------------------
if (!publishable.IsVisible)
{
continue;
}
//------------------------------------------------------------
// Write <entry> element for publishable content
//------------------------------------------------------------
WriteAtomEntry(writer, publishable);
}
}