コード例 #1
0
        /// <summary>
        /// Copy the specified object and place it in the specified destination album. This method creates a completely separate copy
        /// of the original, including copying the physical files associated with this object. The copy is persisted to the data
        /// store and then returned to the caller. When copying albums, all the album's children, grandchildren, etc are also copied.
        /// The audit fields of the copied objects are automatically updated before saving.
        /// </summary>
        /// <param name="galleryObjectToCopy">The gallery object to copy.</param>
        /// <param name="destinationAlbum">The album to which the current object should be copied.</param>
        /// <returns>
        /// Returns a new gallery object that is an exact copy of the original, except that it resides in the specified
        /// destination album, and of course has a new ID. Child objects are recursively copied.
        /// </returns>
        /// <exception cref="ArgumentNullException">Thrown when <paramref name="galleryObjectToCopy" /> is null.</exception>
        public static IGalleryObject CopyGalleryObject(IGalleryObject galleryObjectToCopy, IAlbum destinationAlbum)
        {
            if (galleryObjectToCopy == null)
                throw new ArgumentNullException("galleryObjectToCopy");

            string currentUser = Utils.UserName;

            return galleryObjectToCopy.CopyTo(destinationAlbum, currentUser);
        }
コード例 #2
0
        /// <summary>
        /// Copy the specified object and place it in the specified destination album. This method creates a completely separate copy
        /// of the original, including copying the physical files associated with this object. The copy is persisted to the data
        /// store and then returned to the caller. When copying albums, all the album's children, grandchildren, etc are also copied.
        /// The audit fields of the copied objects are automatically updated before saving.
        /// </summary>
        /// <param name="galleryObjectToCopy">The gallery object to copy.</param>
        /// <param name="destinationAlbum">The album to which the current object should be copied.</param>
        /// <returns>
        /// Returns a new gallery object that is an exact copy of the original, except that it resides in the specified
        /// destination album, and of course has a new ID. Child objects are recursively copied.
        /// </returns>
        /// <exception cref="ArgumentNullException">Thrown when <paramref name="galleryObjectToCopy" /> is null.</exception>
        public static IGalleryObject CopyGalleryObject(IGalleryObject galleryObjectToCopy, IAlbum destinationAlbum)
        {
            if (galleryObjectToCopy == null)
            {
                throw new ArgumentNullException("galleryObjectToCopy");
            }

            string currentUser = Utils.UserName;

            return(galleryObjectToCopy.CopyTo(destinationAlbum, currentUser));
        }
コード例 #3
0
ファイル: WebController.cs プロジェクト: haimon74/KanNaim
		/// <summary>
		/// Copy the specified object and place it in the specified destination album. This method creates a completely separate copy
		/// of the original, including copying the physical files associated with this object. The copy is persisted to the data
		/// store and then returned to the caller. When copying albums, all the album's children, grandchildren, etc are also copied.
		/// The audit fields of the copied objects are automatically updated before saving.
		/// </summary>
		/// <param name="galleryObjectToCopy">The gallery object to copy.</param>
		/// <param name="destinationAlbum">The album to which the current object should be copied.</param>
		/// <returns>
		/// Returns a new gallery object that is an exact copy of the original, except that it resides in the specified
		/// destination album, and of course has a new ID. Child objects are recursively copied.
		/// </returns>
		public static IGalleryObject CopyGalleryObject(IGalleryObject galleryObjectToCopy, IAlbum destinationAlbum)
		{
			string currentUser = HttpContext.Current.User.Identity.Name;

			return galleryObjectToCopy.CopyTo(destinationAlbum, currentUser);
		}
コード例 #4
0
		/// <summary>
		/// Copy the specified object and place it in the specified destination album. This method creates a completely separate copy
		/// of the original, including copying the physical files associated with this object. The copy is persisted to the data
		/// store and then returned to the caller. When copying albums, all the album's children, grandchildren, etc are also copied.
		/// The audit fields of the copied objects are automatically updated before saving.
		/// </summary>
		/// <param name="galleryObjectToCopy">The gallery object to copy.</param>
		/// <param name="destinationAlbum">The album to which the current object should be copied.</param>
		/// <returns>
		/// Returns a new gallery object that is an exact copy of the original, except that it resides in the specified
		/// destination album, and of course has a new ID. Child objects are recursively copied.
		/// </returns>
		public static IGalleryObject CopyGalleryObject(IGalleryObject galleryObjectToCopy, IAlbum destinationAlbum)
		{
			string currentUser = Util.UserName;

			return galleryObjectToCopy.CopyTo(destinationAlbum, currentUser);
		}
コード例 #5
0
        /// <summary>
        /// Copy the specified object and place it in the specified destination album. This method creates a completely separate copy
        /// of the original, including copying the physical files associated with this object. The copy is persisted to the data
        /// store and then returned to the caller. When copying albums, all the album's children, grandchildren, etc are also copied.
        /// The audit fields of the copied objects are automatically updated before saving.
        /// </summary>
        /// <param name="galleryObjectToCopy">The gallery object to copy.</param>
        /// <param name="destinationAlbum">The album to which the current object should be copied.</param>
        /// <returns>
        /// Returns a new gallery object that is an exact copy of the original, except that it resides in the specified
        /// destination album, and of course has a new ID. Child objects are recursively copied.
        /// </returns>
        public static IGalleryObject CopyGalleryObject(IGalleryObject galleryObjectToCopy, IAlbum destinationAlbum)
        {
            string currentUser = Util.UserName;

            return(galleryObjectToCopy.CopyTo(destinationAlbum, currentUser));
        }