Search Results for

    Show / Hide Table of Contents
    View Source

    Class NewEventArgs<TEntity>

    Represents event data for new entity creation operations.

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

    The type of the entity being created.

    Constructors

    View Source

    NewEventArgs(TEntity, bool, string, int)

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

    Declaration
    public NewEventArgs(TEntity eventObject, bool canCancel, string alias, int parentId)
    Parameters
    Type Name Description
    TEntity eventObject

    The entity being created.

    bool canCancel

    A value indicating whether the event can be cancelled.

    string alias

    The alias of the entity.

    int parentId

    The identifier of the parent entity.

    View Source

    NewEventArgs(TEntity, bool, string, int, EventMessages)

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

    Declaration
    public NewEventArgs(TEntity eventObject, bool canCancel, string alias, int parentId, EventMessages eventMessages)
    Parameters
    Type Name Description
    TEntity eventObject

    The entity being created.

    bool canCancel

    A value indicating whether the event can be cancelled.

    string alias

    The alias of the entity.

    int parentId

    The identifier of the parent entity.

    EventMessages eventMessages

    The event messages.

    View Source

    NewEventArgs(TEntity, bool, string, TEntity?)

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

    Declaration
    public NewEventArgs(TEntity eventObject, bool canCancel, string alias, TEntity? parent)
    Parameters
    Type Name Description
    TEntity eventObject

    The entity being created.

    bool canCancel

    A value indicating whether the event can be cancelled.

    string alias

    The alias of the entity.

    TEntity parent

    The parent entity.

    View Source

    NewEventArgs(TEntity, bool, string, TEntity?, EventMessages)

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

    Declaration
    public NewEventArgs(TEntity eventObject, bool canCancel, string alias, TEntity? parent, EventMessages eventMessages)
    Parameters
    Type Name Description
    TEntity eventObject

    The entity being created.

    bool canCancel

    A value indicating whether the event can be cancelled.

    string alias

    The alias of the entity.

    TEntity parent

    The parent entity.

    EventMessages eventMessages

    The event messages.

    View Source

    NewEventArgs(TEntity, string, int)

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

    Declaration
    public NewEventArgs(TEntity eventObject, string alias, int parentId)
    Parameters
    Type Name Description
    TEntity eventObject

    The entity being created.

    string alias

    The alias of the entity.

    int parentId

    The identifier of the parent entity.

    View Source

    NewEventArgs(TEntity, string, int, EventMessages)

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

    Declaration
    public NewEventArgs(TEntity eventObject, string alias, int parentId, EventMessages eventMessages)
    Parameters
    Type Name Description
    TEntity eventObject

    The entity being created.

    string alias

    The alias of the entity.

    int parentId

    The identifier of the parent entity.

    EventMessages eventMessages

    The event messages.

    View Source

    NewEventArgs(TEntity, string, TEntity?)

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

    Declaration
    public NewEventArgs(TEntity eventObject, string alias, TEntity? parent)
    Parameters
    Type Name Description
    TEntity eventObject

    The entity being created.

    string alias

    The alias of the entity.

    TEntity parent

    The parent entity.

    View Source

    NewEventArgs(TEntity, string, TEntity?, EventMessages)

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

    Declaration
    public NewEventArgs(TEntity eventObject, string alias, TEntity? parent, EventMessages eventMessages)
    Parameters
    Type Name Description
    TEntity eventObject

    The entity being created.

    string alias

    The alias of the entity.

    TEntity parent

    The parent entity.

    EventMessages eventMessages

    The event messages.

    Properties

    View Source

    Alias

    Gets or Sets the Alias.

    Declaration
    public string Alias { get; }
    Property Value
    Type Description
    string
    View Source

    Entity

    The entity being created

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

    Parent

    Gets or Sets the parent IContent object.

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

    ParentId

    Gets or Sets the Id of the parent.

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

    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(NewEventArgs<TEntity>?)

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

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    Operators

    View Source

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

    Determines whether two NewEventArgs<TEntity> instances are equal.

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

    The first instance to compare.

    NewEventArgs<TEntity> right

    The second instance to compare.

    Returns
    Type Description
    bool

    true if the instances are equal; otherwise, false.

    View Source

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

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

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

    The first instance to compare.

    NewEventArgs<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