/// <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>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 void 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))); Add(new RssModuleItem("categoryName", true, RssDefault.Check(categoryName))); Add(new RssModuleItem("categoryDescription", true, RssDefault.Check(categoryDescription))); Add(new RssModuleItem("categoryDateRange", true, "", categoryDataRange)); foreach (RssPhotoAlbumCategoryPhoto categoryPhoto in categoryPhotos) Add(new RssModuleItem("categoryPhoto", true, "", categoryPhoto)); }
/// <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) { Add(categoryName, categoryDescription, categoryDateFrom, categoryDateTo, categoryPhotos); }