Class MediaMovingNotification
Notification that is published before media is moved.
Inheritance
object
Namespace: Umbraco.Cms.Core.Notifications
Assembly: Umbraco.Core.dll
Syntax
public sealed class MediaMovingNotification : MovingNotification<IMedia>, IStatefulNotification, ICancelableNotification, INotification
Remarks
This notification is cancelable, allowing handlers to prevent the move operation. The notification is published by the IMediaService before media is moved.
NOTE: If the target parent is the recycle bin, this notification is never published. Use MediaMovingToRecycleBinNotification instead.
Constructors
View SourceMediaMovingNotification(IEnumerable<MoveEventInfo<IMedia>>, EventMessages)
Initializes a new instance of the MediaMovingNotification class with multiple media items.
Declaration
public MediaMovingNotification(IEnumerable<MoveEventInfo<IMedia>> target, EventMessages messages)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<MoveEventInfo<IMedia>> | target | The collection of move information for media items being moved. |
| EventMessages | messages | The event messages collection. |
MediaMovingNotification(MoveEventInfo<IMedia>, EventMessages)
Initializes a new instance of the MediaMovingNotification class with a single media item.
Declaration
public MediaMovingNotification(MoveEventInfo<IMedia> target, EventMessages messages)
Parameters
| Type | Name | Description |
|---|---|---|
| MoveEventInfo<IMedia> | target | The move information for the media item being moved. |
| EventMessages | messages | The event messages collection. |