/// <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>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>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="categoryPhotos">Photos of the category.</param> public RssPhotoAlbumCategory(string categoryName, string categoryDescription, string categoryDateFrom, string categoryDateTo, RssPhotoAlbumCategoryPhotos categoryPhotos) { this.Add(categoryName, categoryDescription, categoryDateFrom, categoryDateTo, categoryPhotos); }