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