/// <summary> /// Modifies the <see cref="AtomFeed"/> optional entities to match the supplied <see cref="XPathNavigator"/> data source. /// </summary> /// <param name="feed">The <see cref="AtomFeed"/> to be filled.</param> /// <param name="source">The <see cref="XPathNavigator"/> to extract information from.</param> /// <param name="manager">The <see cref="XmlNamespaceManager"/> used to resolve XML namespace prefixes.</param> /// <param name="settings">The <see cref="SyndicationResourceLoadSettings"/> used to configure the fill operation.</param> /// <remarks> /// This method expects the supplied <paramref name="source"/> to be positioned on the XML element that represents a <see cref="AtomFeed"/>. /// </remarks> /// <exception cref="ArgumentNullException">The <paramref name="feed"/> is a null reference (Nothing in Visual Basic).</exception> /// <exception cref="ArgumentNullException">The <paramref name="source"/> is a null reference (Nothing in Visual Basic).</exception> /// <exception cref="ArgumentNullException">The <paramref name="manager"/> is a null reference (Nothing in Visual Basic).</exception> /// <exception cref="ArgumentNullException">The <paramref name="settings"/> is a null reference (Nothing in Visual Basic).</exception> private static void FillFeedOptionals(AtomFeed feed, XPathNavigator source, XmlNamespaceManager manager, SyndicationResourceLoadSettings settings) { Guard.ArgumentNotNull(feed, "feed"); Guard.ArgumentNotNull(source, "source"); Guard.ArgumentNotNull(manager, "manager"); Guard.ArgumentNotNull(settings, "settings"); XPathNavigator generatorNavigator = source.SelectSingleNode("atom:generator", manager); XPathNavigator copyrightNavigator = source.SelectSingleNode("atom:copyright", manager); XPathNavigator taglineNavigator = source.SelectSingleNode("atom:tagline", manager); if (generatorNavigator != null) { feed.Generator = Atom03SyndicationResourceAdapter.CreateGenerator(generatorNavigator, manager, settings); } if (copyrightNavigator != null) { feed.Rights = Atom03SyndicationResourceAdapter.CreateTextContent(copyrightNavigator, manager, settings); } if (taglineNavigator != null) { feed.Subtitle = Atom03SyndicationResourceAdapter.CreateTextContent(taglineNavigator, manager, settings); } }