Search Results for

    Show / Hide Table of Contents
    View Source

    Class CancellableEventArgs

    Represents event data for events that support cancellation.

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core.Events
    Assembly: Umbraco.Core.dll
    Syntax
    public class CancellableEventArgs : EventArgs

    Constructors

    View Source

    CancellableEventArgs()

    Declaration
    public CancellableEventArgs()
    View Source

    CancellableEventArgs(Boolean)

    Declaration
    public CancellableEventArgs(bool canCancel)
    Parameters
    Type Name Description
    System.Boolean canCancel
    View Source

    CancellableEventArgs(Boolean, EventMessages)

    Declaration
    public CancellableEventArgs(bool canCancel, EventMessages eventMessages)
    Parameters
    Type Name Description
    System.Boolean canCancel
    EventMessages eventMessages
    View Source

    CancellableEventArgs(Boolean, EventMessages, IDictionary<String, Object>)

    Declaration
    public CancellableEventArgs(bool canCancel, EventMessages messages, IDictionary<string, object> additionalData)
    Parameters
    Type Name Description
    System.Boolean canCancel
    EventMessages messages
    IDictionary<System.String, System.Object> additionalData
    View Source

    CancellableEventArgs(EventMessages)

    Declaration
    public CancellableEventArgs(EventMessages eventMessages)
    Parameters
    Type Name Description
    EventMessages eventMessages

    Properties

    View Source

    AdditionalData

    In some cases raised evens might need to contain additional arbitrary readonly data which can be read by event subscribers

    Declaration
    public ReadOnlyDictionary<string, object> AdditionalData { get; set; }
    Property Value
    Type Description
    System.Collections.ObjectModel.ReadOnlyDictionary<System.String, System.Object>
    Remarks

    This allows for a bit of flexibility in our event raising - it's not pretty but we need to maintain backwards compatibility so we cannot change the strongly typed nature for some events.

    View Source

    CanCancel

    Flag to determine if this instance will support being cancellable

    Declaration
    public bool CanCancel { get; set; }
    Property Value
    Type Description
    System.Boolean
    View Source

    Cancel

    If this instance supports cancellation, this gets/sets the cancel value

    Declaration
    public bool Cancel { get; set; }
    Property Value
    Type Description
    System.Boolean
    View Source

    EventState

    This can be used by event subscribers to store state in the event args so they easily deal with custom state data between a starting ("ing") event and an ending ("ed") event

    Declaration
    public IDictionary<string, object> EventState { get; set; }
    Property Value
    Type Description
    IDictionary<System.String, System.Object>
    View Source

    Messages

    Returns the EventMessages object which is used to add messages to the message collection for this event

    Declaration
    public EventMessages Messages { get; }
    Property Value
    Type Description
    EventMessages

    Methods

    View Source

    CancelOperation(EventMessage)

    if this instance supports cancellation, this will set Cancel to true with an affiliated cancellation message

    Declaration
    public void CancelOperation(EventMessage cancelationMessage)
    Parameters
    Type Name Description
    EventMessage cancelationMessage
    View Source

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    View Source

    Equals(CancellableEventArgs)

    Declaration
    public bool Equals(CancellableEventArgs other)
    Parameters
    Type Name Description
    CancellableEventArgs other
    Returns
    Type Description
    System.Boolean
    View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32

    Operators

    View Source

    Equality(CancellableEventArgs, CancellableEventArgs)

    Declaration
    public static bool operator ==(CancellableEventArgs left, CancellableEventArgs right)
    Parameters
    Type Name Description
    CancellableEventArgs left
    CancellableEventArgs right
    Returns
    Type Description
    System.Boolean
    View Source

    Inequality(CancellableEventArgs, CancellableEventArgs)

    Declaration
    public static bool operator !=(CancellableEventArgs left, CancellableEventArgs right)
    Parameters
    Type Name Description
    CancellableEventArgs left
    CancellableEventArgs right
    Returns
    Type Description
    System.Boolean
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • CancellableEventArgs()
      • CancellableEventArgs(Boolean)
      • CancellableEventArgs(Boolean, EventMessages)
      • CancellableEventArgs(Boolean, EventMessages, IDictionary<String, Object>)
      • CancellableEventArgs(EventMessages)
    • Properties
      • AdditionalData
      • CanCancel
      • Cancel
      • EventState
      • Messages
    • Methods
      • CancelOperation(EventMessage)
      • Equals(Object)
      • Equals(CancellableEventArgs)
      • GetHashCode()
    • Operators
      • Equality(CancellableEventArgs, CancellableEventArgs)
      • Inequality(CancellableEventArgs, CancellableEventArgs)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX