Exemplo n.º 1
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);
        }
Exemplo n.º 2
0
 /// <summary>Adds a sepecified photo to this collection.</summary>
 /// <param name="photo">The photo to add.</param>
 /// <returns>The zero-based index of the added item.</returns>
 public int Add(RssPhotoAlbumCategoryPhoto photo)
 {
     return(base.Add(photo));
 }
Exemplo n.º 3
0
 /// <summary>Initialize a new instance of the RssPhotoAlbumItem class</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>
 public RssPhotoAlbumCategory(string categoryName, string categoryDescription, string categoryDateFrom, string categoryDateTo, RssPhotoAlbumCategoryPhoto categoryPhoto)
 {
     Add(categoryName, categoryDescription, categoryDateFrom, categoryDateTo, categoryPhoto);
 }