Search Results for

    Show / Hide Table of Contents
    View Source

    Class CancelableNotification

    Base class for notifications that can be canceled by a notification handler.

    Inheritance
    object
    StatefulNotification
    Namespace: Umbraco.Cms.Core.Notifications
    Assembly: Umbraco.Core.dll
    Syntax
    public class CancelableNotification : StatefulNotification, IStatefulNotification, ICancelableNotification, INotification
    Remarks

    Notification handlers can set Cancel to true or call CancelOperation(EventMessage) to abort the operation that triggered the notification.

    Constructors

    View Source

    CancelableNotification(EventMessages)

    Initializes a new instance of the CancelableNotification class.

    Declaration
    public CancelableNotification(EventMessages messages)
    Parameters
    Type Name Description
    EventMessages messages

    The event messages collection for adding cancellation messages.

    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.

    View Source

    Messages

    Gets the event messages collection associated with this notification.

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

    Methods

    View Source

    CancelOperation(EventMessage)

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

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

    The message explaining why the operation was canceled.

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