Search Results for

    Show / Hide Table of Contents
    View Source

    Class CopyEventArgs<TEntity>

    Represents event data for copy operations.

    Inheritance
    object
    EventArgs
    CancellableEventArgs
    CancellableObjectEventArgs
    CancellableObjectEventArgs<TEntity>
    Namespace: Umbraco.Cms.Core.Events
    Assembly: Umbraco.Core.dll
    Syntax
    public class CopyEventArgs<TEntity> : CancellableObjectEventArgs<TEntity>
    Type Parameters
    Name Description
    TEntity

    The type of the entity being copied.

    Constructors

    View Source

    CopyEventArgs(TEntity, TEntity, bool, int)

    Initializes a new instance of the CopyEventArgs<TEntity> class.

    Declaration
    public CopyEventArgs(TEntity original, TEntity copy, bool canCancel, int parentId)
    Parameters
    Type Name Description
    TEntity original

    The original entity being copied.

    TEntity copy

    The copied entity.

    bool canCancel

    A value indicating whether the event can be cancelled.

    int parentId

    The identifier of the new parent.

    View Source

    CopyEventArgs(TEntity, TEntity, bool, int, bool)

    Initializes a new instance of the CopyEventArgs<TEntity> class.

    Declaration
    public CopyEventArgs(TEntity eventObject, TEntity copy, bool canCancel, int parentId, bool relateToOriginal)
    Parameters
    Type Name Description
    TEntity eventObject

    The original entity being copied.

    TEntity copy

    The copied entity.

    bool canCancel

    A value indicating whether the event can be cancelled.

    int parentId

    The identifier of the new parent.

    bool relateToOriginal

    A value indicating whether to create a relation to the original entity.

    View Source

    CopyEventArgs(TEntity, TEntity, int)

    Initializes a new instance of the CopyEventArgs<TEntity> class with cancellation enabled.

    Declaration
    public CopyEventArgs(TEntity eventObject, TEntity copy, int parentId)
    Parameters
    Type Name Description
    TEntity eventObject

    The original entity being copied.

    TEntity copy

    The copied entity.

    int parentId

    The identifier of the new parent.

    Properties

    View Source

    Copy

    The copied entity

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

    Original

    The original entity

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

    ParentId

    Gets or Sets the Id of the objects new parent.

    Declaration
    public int ParentId { get; }
    Property Value
    Type Description
    int
    View Source

    RelateToOriginal

    Gets or sets a value indicating whether to create a relation to the original entity.

    Declaration
    public bool RelateToOriginal { get; set; }
    Property Value
    Type Description
    bool

    Methods

    View Source

    Equals(object?)

    Declaration
    public override bool Equals(object? obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    View Source

    Equals(CopyEventArgs<TEntity>?)

    Declaration
    public bool Equals(CopyEventArgs<TEntity>? other)
    Parameters
    Type Name Description
    CopyEventArgs<TEntity> other
    Returns
    Type Description
    bool
    View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    Operators

    View Source

    operator ==(CopyEventArgs<TEntity>, CopyEventArgs<TEntity>)

    Determines whether two CopyEventArgs<TEntity> instances are equal.

    Declaration
    public static bool operator ==(CopyEventArgs<TEntity> left, CopyEventArgs<TEntity> right)
    Parameters
    Type Name Description
    CopyEventArgs<TEntity> left

    The first instance to compare.

    CopyEventArgs<TEntity> right

    The second instance to compare.

    Returns
    Type Description
    bool

    true if the instances are equal; otherwise, false.

    View Source

    operator !=(CopyEventArgs<TEntity>, CopyEventArgs<TEntity>)

    Determines whether two CopyEventArgs<TEntity> instances are not equal.

    Declaration
    public static bool operator !=(CopyEventArgs<TEntity> left, CopyEventArgs<TEntity> right)
    Parameters
    Type Name Description
    CopyEventArgs<TEntity> left

    The first instance to compare.

    CopyEventArgs<TEntity> right

    The second instance to compare.

    Returns
    Type Description
    bool

    true if the instances are not equal; otherwise, false.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX