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