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