Ejemplo n.º 1
0
        /// <summary>Initialize a new instance of the RssPhotoAlbum class</summary>
        /// <param name="link">Link to the Photo Album</param>
        /// <param name="photoAlbumCategory">The category of the Photo Album to add</param>
        public RssPhotoAlbum(Uri link, RssPhotoAlbumCategory photoAlbumCategory)
        {
            NamespacePrefix = "photoAlbum";
            NamespaceURL    = new Uri("http://xml.innothinx.com/photoAlbum");

            ChannelExtensions.Add(new RssModuleItem("link", true, RssDefault.Check(link).ToString()));

            ItemExtensions.Add(photoAlbumCategory);
        }
Ejemplo n.º 2
0
        /// <summary>Initialize a new instance of the </summary>
        /// <param name="license">
        ///		If present as a sub-element of channel, indicates that the content of the RSS file is available under a license, indicated by a URL, which is the value of the license element. A list of some licenses that may be used in this context is on the Creative Commons website on this page, however the license element may point to licenses not authored by Creative Commons.
        ///		You may also use the license element as a sub-element of item. When used this way it applies only to the content of that item. If an item has a license, and the channel does too, the license on the item applies, i.e. the inner license overrides the outer one.
        ///		Multiple license elements are allowed, in either context, indicating that the content is available under multiple licenses.
        ///		<remarks>"http://www.creativecommons.org/licenses/"</remarks>
        ///	</param>
        /// <param name="isChannelSubElement">If present as a sub-element of channel then true, otherwise false</param>
        public RssCreativeCommons(Uri license, bool isChannelSubElement)
        {
            NamespacePrefix = "creativeCommons";
            NamespaceURL    = new Uri("http://backend.userland.com/creativeCommonsRssModule");

            if (isChannelSubElement)
            {
                ChannelExtensions.Add(new RssModuleItem("license", true, RssDefault.Check(license.ToString())));
            }
            else
            {
                var rssItems = new RssModuleItemCollection();

                rssItems.Add(new RssModuleItem("license", true, RssDefault.Check(license.ToString())));

                ItemExtensions.Add(rssItems);
            }
        }