Class CopiedNotification<T>
Abstract base class for notifications published after an entity has been copied.
Namespace: Umbraco.Cms.Core.Notifications
Assembly: Umbraco.Core.dll
Syntax
public abstract class CopiedNotification<T> : ObjectNotification<T>, IStatefulNotification, INotification where T : class
Type Parameters
| Name | Description |
|---|---|
| T | The type of entity that was copied. |
Remarks
This notification is published after the copy has been persisted to the database. It is not cancelable since the copy operation has already completed.
Constructors
View SourceCopiedNotification(T, T, int, bool, EventMessages)
Initializes a new instance of the CopiedNotification<T> class.
Declaration
[Obsolete("Please use constructor that takes a parent key. Scheduled for removal in Umbraco 18.")]
protected CopiedNotification(T original, T copy, int parentId, bool relateToOriginal, EventMessages messages)
Parameters
| Type | Name | Description |
|---|---|---|
| T | original | The original entity that was copied. |
| T | copy | The copy of the entity. |
| int | parentId | The ID of the new parent. |
| bool | relateToOriginal | A value indicating whether the copy is related to the original. |
| EventMessages | messages | The event messages collection. |
CopiedNotification(T, T, int, Guid?, bool, EventMessages)
Initializes a new instance of the CopiedNotification<T> class.
Declaration
protected CopiedNotification(T original, T copy, int parentId, Guid? parentKey, bool relateToOriginal, EventMessages messages)
Parameters
| Type | Name | Description |
|---|---|---|
| T | original | The original entity that was copied. |
| T | copy | The copy of the entity. |
| int | parentId | The ID of the new parent. |
| Guid? | parentKey | The key of the new parent. |
| bool | relateToOriginal | A value indicating whether the copy is related to the original. |
| 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 that was copied.
Declaration
public T Original { get; }
Property Value
| Type | Description |
|---|---|
| T |
ParentId
Gets the ID of the new parent.
Declaration
[Obsolete("Please use parent key instead. Scheduled for removal in Umbraco 18.")]
public int ParentId { get; }
Property Value
| Type | Description |
|---|---|
| int |
ParentKey
Gets the key of the new parent.
Declaration
public Guid? ParentKey { get; }
Property Value
| Type | Description |
|---|---|
| Guid? |
RelateToOriginal
Gets a value indicating whether the copy is related to the original.
Declaration
public bool RelateToOriginal { get; }
Property Value
| Type | Description |
|---|---|
| bool |