Beispiel #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);
 }
Beispiel #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)
        {
            NamespacePrefix = "photoAlbum";
            NamespaceURL    = new Uri("http://xml.innothinx.com/photoAlbum");

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

            ItemExtensions.Add(photoAlbumCategory);
        }
Beispiel #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)
        {
            NamespacePrefix = "blogChannel";
            NamespaceURL    = new Uri("http://backend.userland.com/blogChannelModule");

            ChannelExtensions.Add(new RssModuleItem("blogRoll", true, RssDefault.Check(blogRoll.ToString())));
            ChannelExtensions.Add(new RssModuleItem("mySubscriptions", true, RssDefault.Check(mySubscriptions.ToString())));
            ChannelExtensions.Add(new RssModuleItem("blink", true, RssDefault.Check(blink.ToString())));
            ChannelExtensions.Add(new RssModuleItem("changes", true, RssDefault.Check(changes.ToString())));
        }
Beispiel #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)
        {
            var 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);
        }
Beispiel #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)
        {
            var 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);
        }
Beispiel #6
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);
            }
        }
Beispiel #7
0
 /// <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)
 {
     _sElementText = RssDefault.Check(text);
 }
Beispiel #8
0
 /// <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)
 {
     _sElementText = RssDefault.Check(text);
 }
Beispiel #9
0
 /// <summary>Initialize a new instance of the RssModuleItem class</summary>
 /// <param name="name">The name of this RssModuleItem.</param>
 public RssModuleItem(string name)
 {
     _sElementName = RssDefault.Check(name);
 }