/// <summary> /// Modifies the <see cref="ISyndicationResource"/> to match the data source. /// </summary> /// <param name="resource">The BlogML <see cref="ISyndicationResource"/> to be filled.</param> /// <param name="resourceMetadata">A <see cref="SyndicationResourceMetadata"/> object that represents the meta-data describing the <paramref name="resource"/>.</param> /// <exception cref="ArgumentNullException">The <paramref name="resource"/> is a null reference (Nothing in Visual Basic).</exception> /// <exception cref="ArgumentNullException">The <paramref name="resourceMetadata"/> is a null reference (Nothing in Visual Basic).</exception> private void FillBlogMLResource(ISyndicationResource resource, SyndicationResourceMetadata resourceMetadata) { Guard.ArgumentNotNull(resource, "resource"); Guard.ArgumentNotNull(resourceMetadata, "resourceMetadata"); BlogMLDocument blogMLDocument = resource as BlogMLDocument; BlogML20SyndicationResourceAdapter blogML20Adapter = new BlogML20SyndicationResourceAdapter(this.Navigator, this.Settings); if (resourceMetadata.Version == new Version("2.0")) { blogML20Adapter.Fill(blogMLDocument); } }
/// <summary> /// Modifies the <see cref="ISyndicationResource"/> to match the data source. /// </summary> /// <param name="resource">The BlogML <see cref="ISyndicationResource"/> to be filled.</param> /// <param name="resourceMetadata">A <see cref="SyndicationResourceMetadata"/> object that represents the meta-data describing the <paramref name="resource"/>.</param> /// <exception cref="ArgumentNullException">The <paramref name="resource"/> is a null reference (Nothing in Visual Basic).</exception> /// <exception cref="ArgumentNullException">The <paramref name="resourceMetadata"/> is a null reference (Nothing in Visual Basic).</exception> private void FillBlogMLResource(ISyndicationResource resource, SyndicationResourceMetadata resourceMetadata) { //------------------------------------------------------------ // Validate parameter //------------------------------------------------------------ Guard.ArgumentNotNull(resource, "resource"); Guard.ArgumentNotNull(resourceMetadata, "resourceMetadata"); //------------------------------------------------------------ // Fill syndication resource using appropriate data adapter //------------------------------------------------------------ BlogMLDocument blogMLDocument = resource as BlogMLDocument; BlogML20SyndicationResourceAdapter blogML20Adapter = new BlogML20SyndicationResourceAdapter(this.Navigator, this.Settings); if (resourceMetadata.Version == new Version("2.0")) { blogML20Adapter.Fill(blogMLDocument); } }