Search Results for

    Show / Hide Table of Contents
    View Source

    Class EventDefinitionBase

    Provides a base class for event definitions that can be tracked and raised by an event dispatcher.

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.Events
    Assembly: Umbraco.Core.dll
    Syntax
    public abstract class EventDefinitionBase : IEventDefinition

    Constructors

    View Source

    EventDefinitionBase(object?, object?, string?)

    Initializes a new instance of the EventDefinitionBase class.

    Declaration
    protected EventDefinitionBase(object? sender, object? args, string? eventName = null)
    Parameters
    Type Name Description
    object sender

    The source of the event.

    object args

    The event arguments.

    string eventName

    The optional name of the event.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when sender or args is null.

    AmbiguousMatchException

    Thrown when the event name cannot be automatically determined.

    Properties

    View Source

    Args

    Gets the event arguments.

    Declaration
    public object Args { get; }
    Property Value
    Type Description
    object
    View Source

    EventName

    Gets the name of the event.

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

    Sender

    Gets the source of the event.

    Declaration
    public object Sender { get; }
    Property Value
    Type Description
    object

    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(EventDefinitionBase?)

    Declaration
    public bool Equals(EventDefinitionBase? other)
    Parameters
    Type Name Description
    EventDefinitionBase other
    Returns
    Type Description
    bool
    View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    View Source

    RaiseEvent()

    Raises the event by invoking the tracked event handler.

    Declaration
    public abstract void RaiseEvent()

    Operators

    View Source

    operator ==(EventDefinitionBase, EventDefinitionBase)

    Determines whether two EventDefinitionBase instances are equal.

    Declaration
    public static bool operator ==(EventDefinitionBase left, EventDefinitionBase right)
    Parameters
    Type Name Description
    EventDefinitionBase left

    The first instance to compare.

    EventDefinitionBase right

    The second instance to compare.

    Returns
    Type Description
    bool

    true if the instances are equal; otherwise, false.

    View Source

    operator !=(EventDefinitionBase, EventDefinitionBase)

    Determines whether two EventDefinitionBase instances are not equal.

    Declaration
    public static bool operator !=(EventDefinitionBase left, EventDefinitionBase right)
    Parameters
    Type Name Description
    EventDefinitionBase left

    The first instance to compare.

    EventDefinitionBase 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