Esempio n. 1
0
 /// <summary>Adds a specified item to this collection.</summary>
 /// <param name="photoDate">Date of the Photo</param>
 /// <param name="photoDescription">Description of the photo.</param>
 /// <param name="photoLink">Direct link of the photo.</param>
 /// <returns>The zero-based index of the added item.</returns>
 private int Add(string photoDate, string photoDescription, Uri photoLink)
 {
     base.Add(new RssModuleItem("photoDate", true, RssDefault.Check(photoDate)));
     base.Add(new RssModuleItem("photoDescription", false, RssDefault.Check(photoDescription)));
     base.Add(new RssModuleItem("photoLink", true, RssDefault.Check(photoLink).ToString()));
     return(-1);
 }
Esempio n. 2
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)
        {
            base.NamespacePrefix = "photoAlbum";
            base.NamespaceURL    = new Uri("http://xml.innothinx.com/photoAlbum");

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

            base.ItemExtensions.Add(photoAlbumCategory);
        }
Esempio n. 3
0
        /// <summary>Initialize a new instance of the </summary>
        /// <param name="blogRoll">The URL of an OPML file containing the blogroll for the site.</param>
        /// <param name="mySubscriptions">The URL of an OPML file containing the author's RSS subscriptions.</param>
        /// <param name="blink">
        ///		The URL of a weblog that the author of the weblog is promoting per Mark Pilgrim's description.
        ///		<remarks>"http://diveintomark.org/archives/2002/09/17.html#blink_and_youll_miss_it"</remarks>
        ///	</param>
        /// <param name="changes">
        ///		The URL of a changes.xml file. When the feed that contains this element updates, it pings a server that updates this file. The presence of this element says to aggregators that they only have to read the changes file to see if this feed has updated. If several feeds point to the same changes file, the aggregator has to do less polling, resulting in better use of server bandwidth, and the Internet as a whole; and resulting in faster scans. Everyone wins. For more technical information, see the howto on the XML-RPC site.
        ///		<remarks>"http://www.xmlrpc.com/weblogsComForRss"</remarks>
        /// </param>
        public RssBlogChannel(Uri blogRoll, Uri mySubscriptions, Uri blink, Uri changes)
        {
            base.NamespacePrefix = "blogChannel";
            base.NamespaceURL    = new Uri("http://backend.userland.com/blogChannelModule");

            base.ChannelExtensions.Add(new RssModuleItem("blogRoll", true, RssDefault.Check(blogRoll.ToString())));
            base.ChannelExtensions.Add(new RssModuleItem("mySubscriptions", true, RssDefault.Check(mySubscriptions.ToString())));
            base.ChannelExtensions.Add(new RssModuleItem("blink", true, RssDefault.Check(blink.ToString())));
            base.ChannelExtensions.Add(new RssModuleItem("changes", true, RssDefault.Check(changes.ToString())));
        }
Esempio n. 4
0
        /// <summary>Adds a specified category to this collection.</summary>
        /// <param name="categoryName">Name of the category.</param>
        /// <param name="categoryDescription">Description of the category.</param>
        /// <param name="categoryDateFrom">From date of the category.</param>
        /// <param name="categoryDateTo">To date of the category.</param>
        /// <param name="categoryPhoto">Photos of the category.</param>
        /// <returns>The zero-based index of the added item.</returns>
        private int Add(string categoryName, string categoryDescription, string categoryDateFrom, string categoryDateTo, RssPhotoAlbumCategoryPhoto categoryPhoto)
        {
            RssModuleItemCollection categoryDataRange = new RssModuleItemCollection();

            categoryDataRange.Add(new RssModuleItem("from", true, RssDefault.Check(categoryDateFrom)));
            categoryDataRange.Add(new RssModuleItem("to", true, RssDefault.Check(categoryDateTo)));

            base.Add(new RssModuleItem("categoryName", true, RssDefault.Check(categoryName)));
            base.Add(new RssModuleItem("categoryDescription", true, RssDefault.Check(categoryDescription)));
            base.Add(new RssModuleItem("categoryDateRange", true, "", categoryDataRange));
            base.Add(new RssModuleItem("categoryPhoto", true, "", categoryPhoto));

            return(-1);
        }
Esempio n. 5
0
        /// <summary>Adds a specified category to this collection.</summary>
        /// <param name="categoryName">Name of the category.</param>
        /// <param name="categoryDescription">Description of the category.</param>
        /// <param name="categoryDateFrom">From date of the category.</param>
        /// <param name="categoryDateTo">To date of the category.</param>
        /// <param name="categoryPhotos">Photos of the category.</param>
        /// <returns>The zero-based index of the added item.</returns>
        private int Add(string categoryName, string categoryDescription, DateTime categoryDateFrom, DateTime categoryDateTo, RssPhotoAlbumCategoryPhotos categoryPhotos)
        {
            RssModuleItemCollection categoryDataRange = new RssModuleItemCollection();

            categoryDataRange.Add(new RssModuleItem("from", true, RssDefault.Check(categoryDateFrom.ToUniversalTime().ToString("r"))));
            categoryDataRange.Add(new RssModuleItem("to", true, RssDefault.Check(categoryDateTo.ToUniversalTime().ToString("r"))));

            base.Add(new RssModuleItem("categoryName", true, RssDefault.Check(categoryName)));
            base.Add(new RssModuleItem("categoryDescription", true, RssDefault.Check(categoryDescription)));
            base.Add(new RssModuleItem("categoryDateRange", true, "", categoryDataRange));
            foreach (RssPhotoAlbumCategoryPhoto categoryPhoto in categoryPhotos)
            {
                base.Add(new RssModuleItem("categoryPhoto", true, "", categoryPhoto));
            }

            return(-1);
        }
        /// <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)
        {
            base.NamespacePrefix = "creativeCommons";
            base.NamespaceURL    = new Uri("http://backend.userland.com/creativeCommonsRssModule");

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

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

                base.ItemExtensions.Add(rssItems);
            }
        }
 /// <summary>Initialize a new instance of the RssModuleItem class</summary>
 /// <param name="name">The name of this RssModuleItem.</param>
 /// <param name="required">Is text required for this RssModuleItem?</param>
 /// <param name="text">The text contained within this RssModuleItem.</param>
 public RssModuleItem(string name, bool required, string text) : this(name, required)
 {
     this._sElementText = RssDefault.Check(text);
 }
 /// <summary>Initialize a new instance of the RssModuleItem class</summary>
 /// <param name="name">The name of this RssModuleItem.</param>
 /// <param name="text">The text contained within this RssModuleItem.</param>
 public RssModuleItem(string name, string text) : this(name)
 {
     this._sElementText = RssDefault.Check(text);
 }
 /// <summary>Initialize a new instance of the RssModuleItem class</summary>
 /// <param name="name">The name of this RssModuleItem.</param>
 public RssModuleItem(string name)
 {
     this._sElementName = RssDefault.Check(name);
 }