Class ContentTreeChangeNotification
Notification published when changes occur in the content tree structure.
Inheritance
Namespace: Umbraco.Cms.Core.Notifications
Assembly: Umbraco.Core.dll
Syntax
public class ContentTreeChangeNotification : TreeChangeNotification<IContent>, IStatefulNotification, INotification
Remarks
This notification is published when content items are added, removed, moved, or have their structure modified in the content tree. It is used for cache invalidation and tree synchronization.
Constructors
View SourceContentTreeChangeNotification(IEnumerable<IContent>, TreeChangeTypes, EventMessages)
Initializes a new instance of the ContentTreeChangeNotification class for multiple content items with the same change type.
Declaration
public ContentTreeChangeNotification(IEnumerable<IContent> target, TreeChangeTypes changeTypes, EventMessages messages)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<IContent> | target | The content items that changed. |
| TreeChangeTypes | changeTypes | The type of changes that occurred. |
| EventMessages | messages | The event messages collection. |
ContentTreeChangeNotification(IEnumerable<TreeChange<IContent>>, EventMessages)
Initializes a new instance of the ContentTreeChangeNotification class with multiple tree changes.
Declaration
public ContentTreeChangeNotification(IEnumerable<TreeChange<IContent>> target, EventMessages messages)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<TreeChange<IContent>> | target | The collection of tree changes that occurred. |
| EventMessages | messages | The event messages collection. |
ContentTreeChangeNotification(IContent, TreeChangeTypes, IEnumerable<string>?, IEnumerable<string>?, EventMessages)
Initializes a new instance of the ContentTreeChangeNotification class for a single content item with culture-specific publishing information.
Declaration
public ContentTreeChangeNotification(IContent target, TreeChangeTypes changeTypes, IEnumerable<string>? publishedCultures, IEnumerable<string>? unpublishedCultures, EventMessages messages)
Parameters
| Type | Name | Description |
|---|---|---|
| IContent | target | The content item that changed. |
| TreeChangeTypes | changeTypes | The type of changes that occurred. |
| IEnumerable<string> | publishedCultures | The cultures that were published, if any. |
| IEnumerable<string> | unpublishedCultures | The cultures that were unpublished, if any. |
| EventMessages | messages | The event messages collection. |
ContentTreeChangeNotification(IContent, TreeChangeTypes, EventMessages)
Initializes a new instance of the ContentTreeChangeNotification class for a single content item.
Declaration
public ContentTreeChangeNotification(IContent target, TreeChangeTypes changeTypes, EventMessages messages)
Parameters
| Type | Name | Description |
|---|---|---|
| IContent | target | The content item that changed. |
| TreeChangeTypes | changeTypes | The type of changes that occurred. |
| EventMessages | messages | The event messages collection. |
ContentTreeChangeNotification(TreeChange<IContent>, EventMessages)
Initializes a new instance of the ContentTreeChangeNotification class with a single tree change.
Declaration
public ContentTreeChangeNotification(TreeChange<IContent> target, EventMessages messages)
Parameters
| Type | Name | Description |
|---|---|---|
| TreeChange<IContent> | target | The tree change that occurred. |
| EventMessages | messages | The event messages collection. |