Class ContentUnpublishingNotification
Notification that is published before content is unpublished.
Inheritance
object
Namespace: Umbraco.Cms.Core.Notifications
Assembly: Umbraco.Core.dll
Syntax
public sealed class ContentUnpublishingNotification : CancelableEnumerableObjectNotification<IContent>, IStatefulNotification, ICancelableNotification, INotification
Remarks
This notification is cancelable, allowing handlers to prevent the unpublish operation. The notification is published by the IContentService before content is removed from the public site.
Constructors
View SourceContentUnpublishingNotification(IEnumerable<IContent>, EventMessages)
Initializes a new instance of the ContentUnpublishingNotification class with multiple content items.
Declaration
public ContentUnpublishingNotification(IEnumerable<IContent> target, EventMessages messages)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<IContent> | target | The collection of content items being unpublished. |
| EventMessages | messages | The event messages collection. |
ContentUnpublishingNotification(IContent, EventMessages)
Initializes a new instance of the ContentUnpublishingNotification class with a single content item.
Declaration
public ContentUnpublishingNotification(IContent target, EventMessages messages)
Parameters
| Type | Name | Description |
|---|---|---|
| IContent | target | The content item being unpublished. |
| EventMessages | messages | The event messages collection. |
Properties
View SourceUnpublishedEntities
Gets the collection of IContent items being unpublished.
Declaration
public IEnumerable<IContent> UnpublishedEntities { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<IContent> |