Class CopyingNotification<T>
Abstract base class for notifications published before an entity is copied.
Namespace: Umbraco.Cms.Core.Notifications
Assembly: Umbraco.Core.dll
Syntax
public abstract class CopyingNotification<T> : CancelableObjectNotification<T>, IStatefulNotification, ICancelableNotification, INotification where T : class
Type Parameters
| Name | Description |
|---|---|
| T | The type of entity being copied. |
Remarks
This notification is cancelable, allowing handlers to prevent the copy operation. The notification is published before the copy is persisted to the database.
Constructors
View SourceCopyingNotification(T, T, int, Guid?, EventMessages)
Initializes a new instance of the CopyingNotification<T> class.
Declaration
[Obsolete("Please use the constructor without parentId instead. Scheduled for removal in Umbraco 20.")]
protected CopyingNotification(T original, T copy, int parentId, Guid? parentKey, EventMessages messages)
Parameters
| Type | Name | Description |
|---|---|---|
| T | original | The original entity being copied. |
| T | copy | The copy of the entity. |
| int | parentId | The ID of the new parent. |
| Guid? | parentKey | The key of the new parent. |
| EventMessages | messages | The event messages collection. |
CopyingNotification(T, T, Guid?, EventMessages)
Initializes a new instance of the CopyingNotification<T> class.
Declaration
protected CopyingNotification(T original, T copy, Guid? parentKey, EventMessages messages)
Parameters
| Type | Name | Description |
|---|---|---|
| T | original | The original entity being copied. |
| T | copy | The copy of the entity. |
| Guid? | parentKey | The key of the new parent. |
| EventMessages | messages | The event messages collection. |
Properties
View SourceCopy
Gets the copy of the entity.
Declaration
public T Copy { get; }
Property Value
| Type | Description |
|---|---|
| T |
Original
Gets the original entity being copied.
Declaration
public T Original { get; }
Property Value
| Type | Description |
|---|---|
| T |
ParentKey
Gets the key of the new parent.
Declaration
public Guid? ParentKey { get; }
Property Value
| Type | Description |
|---|---|
| Guid? |