예제 #1
0
        // Token: 0x0600068C RID: 1676 RVA: 0x00023B78 File Offset: 0x00021D78
        private int Add(string categoryName, string categoryDescription, string categoryDateFrom, string categoryDateTo, RssPhotoAlbumCategoryPhoto categoryPhoto)
        {
            RssModuleItemCollection rssModuleItemCollection = new RssModuleItemCollection();

            rssModuleItemCollection.Add(new RssModuleItem("from", true, RssDefault.Check(categoryDateFrom)));
            rssModuleItemCollection.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, "", rssModuleItemCollection));
            base.Add(new RssModuleItem("categoryPhoto", true, "", categoryPhoto));
            return(-1);
        }
예제 #2
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, DateTime categoryDateFrom, DateTime categoryDateTo, RssPhotoAlbumCategoryPhoto categoryPhoto)
        {
            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));
            base.Add(new RssModuleItem("categoryPhoto", true, "", categoryPhoto));

            return(-1);
        }
        // Token: 0x06000679 RID: 1657 RVA: 0x00023844 File Offset: 0x00021A44
        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())));
                return;
            }
            RssModuleItemCollection rssModuleItemCollection = new RssModuleItemCollection();

            rssModuleItemCollection.Add(new RssModuleItem("license", true, RssDefault.Check(license.ToString())));
            base.ItemExtensions.Add(rssModuleItemCollection);
        }
        /// <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)
        {
            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);
            }
        }
예제 #5
0
        // Token: 0x0600068E RID: 1678 RVA: 0x00023C34 File Offset: 0x00021E34
        private int Add(string categoryName, string categoryDescription, DateTime categoryDateFrom, DateTime categoryDateTo, RssPhotoAlbumCategoryPhotos categoryPhotos)
        {
            RssModuleItemCollection rssModuleItemCollection = new RssModuleItemCollection();

            rssModuleItemCollection.Add(new RssModuleItem("from", true, RssDefault.Check(categoryDateFrom.ToUniversalTime().ToString("r"))));
            rssModuleItemCollection.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, "", rssModuleItemCollection));
            foreach (RssPhotoAlbumCategoryPhoto subElements in categoryPhotos)
            {
                base.Add(new RssModuleItem("categoryPhoto", true, "", subElements));
            }
            return(-1);
        }
예제 #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)
        {
            if (isChannelSubElement)
            {
                this.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())));

                this.ItemExtensions.Add(rssItems);
            }
        }
예제 #7
0
 private void writeSubElements(RssModuleItemCollection items, string NamespacePrefix)
 {
     foreach (RssModuleItem rssModuleItem in items)
     {
         if (rssModuleItem.SubElements.Count == 0)
         {
             this.WriteElement(NamespacePrefix + ":" + rssModuleItem.Name, rssModuleItem.Text, rssModuleItem.IsRequired);
         }
         else
         {
             this.Writer.WriteStartElement(NamespacePrefix + ":" + rssModuleItem.Name);
             this.writeSubElements(rssModuleItem.SubElements, NamespacePrefix);
             this.Writer.WriteEndElement();
         }
     }
 }
예제 #8
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, string categoryDateFrom, string categoryDateTo, RssPhotoAlbumCategoryPhotos categoryPhotos)
        {
            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));
            foreach (RssPhotoAlbumCategoryPhoto categoryPhoto in categoryPhotos)
            {
                base.Add(new RssModuleItem("categoryPhoto", true, "", categoryPhoto));
            }

            return(-1);
        }
예제 #9
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)
        {
            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);
            }
        }
예제 #10
0
 /// <summary>Determines whether the RssModuleItemCollectionCollection contains a specific element.</summary>
 /// <param name="rssModuleItemCollection">The RssModuleItemCollection to locate in the RssModuleItemCollectionCollection.</param>
 /// <returns>true if the RssModuleItemCollectionCollection contains the specified value; otherwise, false.</returns>
 public bool Contains(RssModuleItemCollection rssModuleItemCollection)
 {
     return(List.Contains(rssModuleItemCollection));
 }
        /// <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, DateTime categoryDateFrom, DateTime categoryDateTo, RssPhotoAlbumCategoryPhoto categoryPhoto)
        {
            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));
            base.Add(new RssModuleItem("categoryPhoto", true, "", categoryPhoto));

            return -1;
        }
        /// <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, string categoryDateFrom, string categoryDateTo, RssPhotoAlbumCategoryPhotos categoryPhotos)
        {
            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));
            foreach(RssPhotoAlbumCategoryPhoto categoryPhoto in categoryPhotos)
                base.Add(new RssModuleItem("categoryPhoto", true, "", categoryPhoto));

            return -1;
        }
		/// <summary>Inserts an item into this collection at a specified index.</summary>
		/// <param name="index">The zero-based index of the collection at which to insert the item.</param>
		/// <param name="rssModuleItemCollection">The item to insert into this collection.</param>
		public void Insert(int index, RssModuleItemCollection rssModuleItemCollection)
		{
			List.Insert(index, rssModuleItemCollection);
		}
		/// <summary>Removes a specified item from this collection.</summary>
		/// <param name="rssModuleItemCollection">The item to remove.</param>
		public void Remove(RssModuleItemCollection rssModuleItemCollection)
		{
			List.Remove(rssModuleItemCollection);
		}
		/// <summary>Copies the entire RssModuleItemCollectionCollection to a compatible one-dimensional <see cref="Array"/>, starting at the specified index of the target array.</summary>
		/// <param name="array">The one-dimensional RssModuleItemCollection Array that is the destination of the elements copied from RssModuleItemCollectionCollection. The Array must have zero-based indexing.</param>
		/// <param name="index">The zero-based index in array at which copying begins.</param>
		/// <exception cref="ArgumentNullException">array is a null reference (Nothing in Visual Basic).</exception>
		/// <exception cref="ArgumentOutOfRangeException">index is less than zero.</exception>
		/// <exception cref="ArgumentException">array is multidimensional. -or- index is equal to or greater than the length of array.-or-The number of elements in the source RssModuleItemCollectionCollection is greater than the available space from index to the end of the destination array.</exception>
		public void CopyTo(RssModuleItemCollection[] array, int index)
		{
			List.CopyTo(array, index);
		}
		/// <summary>Searches for the specified RssModuleItemCollection and returns the zero-based index of the first occurrence within the entire RssModuleItemCollectionCollection.</summary>
		/// <param name="rssModuleItemCollection">The RssModuleItemCollection to locate in the RssModuleItemCollectionCollection.</param>
		/// <returns>The zero-based index of the first occurrence of RssModuleItemCollection within the entire RssModuleItemCollectionCollection, if found; otherwise, -1.</returns>
		public int IndexOf(RssModuleItemCollection rssModuleItemCollection)
		{
			return List.IndexOf(rssModuleItemCollection);
		}
		/// <summary>Adds a specified item to this collection.</summary>
		/// <param name="rssModuleItemCollection">The item to add.</param>
		/// <returns>The zero-based index of the added item.</returns>
		public int Add(RssModuleItemCollection rssModuleItemCollection)
		{
			return List.Add(rssModuleItemCollection);
		}
		/// <summary>Determines whether the RssModuleItemCollectionCollection contains a specific element.</summary>
		/// <param name="rssModuleItemCollection">The RssModuleItemCollection to locate in the RssModuleItemCollectionCollection.</param>
		/// <returns>true if the RssModuleItemCollectionCollection contains the specified value; otherwise, false.</returns>
		public bool Contains(RssModuleItemCollection rssModuleItemCollection)
		{
			return List.Contains(rssModuleItemCollection);
		}
예제 #19
0
 private void writeSubElements(RssModuleItemCollection items, string NamespacePrefix)
 {
     foreach(RssModuleItem rssModuleItem in items)
     {
         if(rssModuleItem.SubElements.Count == 0)
             WriteElement(NamespacePrefix + ":" + rssModuleItem.Name, rssModuleItem.Text, rssModuleItem.IsRequired);
         else
         {
             Writer.WriteStartElement(NamespacePrefix + ":" + rssModuleItem.Name);
             writeSubElements(rssModuleItem.SubElements, NamespacePrefix);
             Writer.WriteEndElement();
         }
     }
 }
예제 #20
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>
 /// <param name="subElements">The sub-elements of this RssModuleItem (if any exist).</param>
 public RssModuleItem(string name, bool required, string text, RssModuleItemCollection subElements) : this(name, required, text)
 {
     this._rssSubElements = subElements;
 }
예제 #21
0
 /// <summary>Searches for the specified RssModuleItemCollection and returns the zero-based index of the first occurrence within the entire RssModuleItemCollectionCollection.</summary>
 /// <param name="rssModuleItemCollection">The RssModuleItemCollection to locate in the RssModuleItemCollectionCollection.</param>
 /// <returns>The zero-based index of the first occurrence of RssModuleItemCollection within the entire RssModuleItemCollectionCollection, if found; otherwise, -1.</returns>
 public int IndexOf(RssModuleItemCollection rssModuleItemCollection)
 {
     return(List.IndexOf(rssModuleItemCollection));
 }
예제 #22
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>
 /// <param name="subElements">The sub-elements of this RssModuleItem (if any exist).</param>
 public RssModuleItem(string name, string text, RssModuleItemCollection subElements)
     : this(name, text)
 {
     this._rssSubElements = subElements;
 }
예제 #23
0
 /// <summary>Adds a specified item to this collection.</summary>
 /// <param name="rssModuleItemCollection">The item to add.</param>
 /// <returns>The zero-based index of the added item.</returns>
 public int Add(RssModuleItemCollection rssModuleItemCollection)
 {
     return(List.Add(rssModuleItemCollection));
 }
예제 #24
0
 /// <summary>Removes a specified item from this collection.</summary>
 /// <param name="rssModuleItemCollection">The item to remove.</param>
 public void Remove(RssModuleItemCollection rssModuleItemCollection)
 {
     List.Remove(rssModuleItemCollection);
 }
예제 #25
0
 /// <summary>Inserts an item into this collection at a specified index.</summary>
 /// <param name="index">The zero-based index of the collection at which to insert the item.</param>
 /// <param name="rssModuleItemCollection">The item to insert into this collection.</param>
 public void Insert(int index, RssModuleItemCollection rssModuleItemCollection)
 {
     List.Insert(index, rssModuleItemCollection);
 }