Search Results for

    Show / Hide Table of Contents
    View Source

    Class CopiedNotification<T>

    Abstract base class for notifications published after an entity has been copied.

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

    CopiedNotification(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.

    View Source

    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 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 that was 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

    RelateToOriginal

    Gets a value indicating whether the copy is related to the original.

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