/// <summary>
        /// Modifies the <see cref="ISyndicationResource"/> to match the data source.
        /// </summary>
        /// <param name="resource">The Really Simple Discovery (RSD) <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 FillRsdResource(ISyndicationResource resource, SyndicationResourceMetadata resourceMetadata)
        {
            //------------------------------------------------------------
            //	Validate parameter
            //------------------------------------------------------------
            Guard.ArgumentNotNull(resource, "resource");
            Guard.ArgumentNotNull(resourceMetadata, "resourceMetadata");

            //------------------------------------------------------------
            //	Fill syndication resource using appropriate data adapter
            //------------------------------------------------------------
            RsdDocument rsdDocument = resource as RsdDocument;

            if (resourceMetadata.Version == new Version("1.0"))
            {
                Rsd10SyndicationResourceAdapter rsd10Adapter = new Rsd10SyndicationResourceAdapter(this.Navigator, this.Settings);
                rsd10Adapter.Fill(rsdDocument);
            }

            if (resourceMetadata.Version == new Version("0.6"))
            {
                Rsd06SyndicationResourceAdapter rsd06Adapter = new Rsd06SyndicationResourceAdapter(this.Navigator, this.Settings);
                rsd06Adapter.Fill(rsdDocument);
            }
        }
        /// <summary>
        /// Modifies the <see cref="ISyndicationResource"/> to match the data source.
        /// </summary>
        /// <param name="resource">The Really Simple Discovery (RSD) <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 FillRsdResource(ISyndicationResource resource, SyndicationResourceMetadata resourceMetadata)
        {
            Guard.ArgumentNotNull(resource, "resource");
            Guard.ArgumentNotNull(resourceMetadata, "resourceMetadata");

            RsdDocument rsdDocument = resource as RsdDocument;

            if (resourceMetadata.Version == new Version("1.0"))
            {
                Rsd10SyndicationResourceAdapter rsd10Adapter = new Rsd10SyndicationResourceAdapter(this.Navigator, this.Settings);
                rsd10Adapter.Fill(rsdDocument);
            }

            if (resourceMetadata.Version == new Version("0.6"))
            {
                Rsd06SyndicationResourceAdapter rsd06Adapter = new Rsd06SyndicationResourceAdapter(this.Navigator, this.Settings);
                rsd06Adapter.Fill(rsdDocument);
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Modifies the <see cref="ISyndicationResource"/> to match the data source.
        /// </summary>
        /// <param name="resource">The Really Simple Discovery (RSD) <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 FillRsdResource(ISyndicationResource resource, SyndicationResourceMetadata resourceMetadata)
        {
            //------------------------------------------------------------
            //	Validate parameter
            //------------------------------------------------------------
            Guard.ArgumentNotNull(resource, "resource");
            Guard.ArgumentNotNull(resourceMetadata, "resourceMetadata");

            //------------------------------------------------------------
            //	Fill syndication resource using appropriate data adapter
            //------------------------------------------------------------
            RsdDocument rsdDocument = resource as RsdDocument;

            if (resourceMetadata.Version == new Version("1.0"))
            {
                Rsd10SyndicationResourceAdapter rsd10Adapter    = new Rsd10SyndicationResourceAdapter(this.Navigator, this.Settings);
                rsd10Adapter.Fill(rsdDocument);
            }

            if (resourceMetadata.Version == new Version("0.6"))
            {
                Rsd06SyndicationResourceAdapter rsd06Adapter    = new Rsd06SyndicationResourceAdapter(this.Navigator, this.Settings);
                rsd06Adapter.Fill(rsdDocument);
            }
        }