Search Results for

    Show / Hide Table of Contents
    View Source

    Class CancelableObjectNotification<T>

    Abstract base class for cancelable notifications that carry a target object.

    Inheritance
    object
    StatefulNotification
    ObjectNotification<T>
    Namespace: Umbraco.Cms.Core.Notifications
    Assembly: Umbraco.Core.dll
    Syntax
    public abstract class CancelableObjectNotification<T> : ObjectNotification<T>, IStatefulNotification, ICancelableNotification, INotification where T : class
    Type Parameters
    Name Description
    T

    The type of the target object associated with this notification.

    Remarks

    This class combines the functionality of ObjectNotification<T> and ICancelableNotification, allowing handlers to both access the target object and cancel the operation if needed.

    Constructors

    View Source

    CancelableObjectNotification(T, EventMessages)

    Initializes a new instance of the CancelableObjectNotification<T> class.

    Declaration
    protected CancelableObjectNotification(T target, EventMessages messages)
    Parameters
    Type Name Description
    T target

    The target object associated with this notification.

    EventMessages messages

    The event messages collection.

    Properties

    View Source

    Cancel

    Gets or sets a value indicating whether the operation should be canceled.

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

    true if the operation should be canceled; otherwise, false.

    Methods

    View Source

    CancelOperation(EventMessage)

    Cancels the operation and adds a cancellation message to the event messages collection.

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

    The message explaining why the operation was canceled.

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