Class MediaTypeSavingNotification
Notification that is published before a media type is saved.
Inheritance
object
Namespace: Umbraco.Cms.Core.Notifications
Assembly: Umbraco.Core.dll
Syntax
public class MediaTypeSavingNotification : SavingNotification<IMediaType>, IStatefulNotification, ICancelableNotification, INotification
Remarks
This notification is cancelable, allowing handlers to prevent the save operation. The notification is published by the IMediaTypeService before the media type is persisted.
Constructors
View SourceMediaTypeSavingNotification(IEnumerable<IMediaType>, EventMessages)
Initializes a new instance of the MediaTypeSavingNotification class with multiple media types.
Declaration
public MediaTypeSavingNotification(IEnumerable<IMediaType> target, EventMessages messages)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<IMediaType> | target | The collection of media types being saved. |
| EventMessages | messages | The event messages collection. |
MediaTypeSavingNotification(IMediaType, EventMessages)
Initializes a new instance of the MediaTypeSavingNotification class with a single media type.
Declaration
public MediaTypeSavingNotification(IMediaType target, EventMessages messages)
Parameters
| Type | Name | Description |
|---|---|---|
| IMediaType | target | The media type being saved. |
| EventMessages | messages | The event messages collection. |