Search Results for

    Show / Hide Table of Contents
    View Source

    Class CopyingNotification<T>

    Abstract base class for notifications published before an entity is copied.

    Inheritance
    object
    StatefulNotification
    ObjectNotification<T>
    CancelableObjectNotification<T>
    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 Source

    CopyingNotification(T, T, int, Guid?, EventMessages)

    Initializes a new instance of the CopyingNotification<T> class.

    Declaration
    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.

    View Source

    CopyingNotification(T, T, int, EventMessages)

    Initializes a new instance of the CopyingNotification<T> class.

    Declaration
    [Obsolete("Please use constructor that takes a parent key. Scheduled for removal in Umbraco 18.")]
    protected CopyingNotification(T original, T copy, int parentId, 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.

    EventMessages messages

    The event messages collection.

    Properties

    View Source

    Copy

    Gets the copy of the entity.

    Declaration
    public T Copy { get; }
    Property Value
    Type Description
    T
    View Source

    Original

    Gets the original entity being copied.

    Declaration
    public T Original { get; }
    Property Value
    Type Description
    T
    View Source

    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
    View Source

    ParentKey

    Gets the key of the new parent.

    Declaration
    public Guid? ParentKey { get; }
    Property Value
    Type Description
    Guid?
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX