Class ContentPublishedNotification
Notification that is published after content has been published.
Inheritance
Namespace: Umbraco.Cms.Core.Notifications
Assembly: Umbraco.Core.dll
Syntax
public sealed class ContentPublishedNotification : EnumerableObjectNotification<IContent>, IStatefulNotification, INotification
Remarks
This notification is published by the IContentService after content has been made publicly available. It is not cancelable since the publish operation has already completed.
Constructors
View SourceContentPublishedNotification(IEnumerable<IContent>, EventMessages)
Initializes a new instance of the ContentPublishedNotification class with multiple content items.
Declaration
public ContentPublishedNotification(IEnumerable<IContent> target, EventMessages messages)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<IContent> | target | The collection of content items that were published. |
| EventMessages | messages | The event messages collection. |
ContentPublishedNotification(IEnumerable<IContent>, EventMessages, bool)
Initializes a new instance of the ContentPublishedNotification class with multiple content items and descendant flag.
Declaration
public ContentPublishedNotification(IEnumerable<IContent> target, EventMessages messages, bool includeDescendants)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<IContent> | target | The collection of content items that were published. |
| EventMessages | messages | The event messages collection. |
| bool | includeDescendants | A value indicating whether descendants were included in the publish operation. |
ContentPublishedNotification(IContent, EventMessages)
Initializes a new instance of the ContentPublishedNotification class with a single content item.
Declaration
public ContentPublishedNotification(IContent target, EventMessages messages)
Parameters
| Type | Name | Description |
|---|---|---|
| IContent | target | The content item that was published. |
| EventMessages | messages | The event messages collection. |
Properties
View SourceIncludeDescendants
Gets a value indicating whether descendants were included in the publish operation.
Declaration
public bool IncludeDescendants { get; }
Property Value
| Type | Description |
|---|---|
| bool |
PublishedEntities
Gets the collection of IContent items that were published.
Declaration
public IEnumerable<IContent> PublishedEntities { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<IContent> |