Search Results for

    Show / Hide Table of Contents
    View Source

    Class ScopedNotificationPublisher<TNotificationHandler>

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.Events
    Assembly: Umbraco.Core.dll
    Syntax
    public class ScopedNotificationPublisher<TNotificationHandler> : IScopedNotificationPublisher where TNotificationHandler : INotificationHandler
    Type Parameters
    Name Description
    TNotificationHandler

    Constructors

    View Source

    ScopedNotificationPublisher(IEventAggregator, bool)

    Declaration
    public ScopedNotificationPublisher(IEventAggregator eventAggregator, bool publishCancelableNotificationOnScopeExit = false)
    Parameters
    Type Name Description
    IEventAggregator eventAggregator
    bool publishCancelableNotificationOnScopeExit

    Methods

    View Source

    Publish(INotification)

    Publishes a notification to the notification subscribers

    Declaration
    public void Publish(INotification notification)
    Parameters
    Type Name Description
    INotification notification
    Remarks

    The notification is published upon successful completion of the current scope, i.e. when things have been saved/published/deleted etc.

    View Source

    PublishCancelable(ICancelableNotification)

    Publishes a cancelable notification to the notification subscribers

    Declaration
    public bool PublishCancelable(ICancelableNotification notification)
    Parameters
    Type Name Description
    ICancelableNotification notification
    Returns
    Type Description
    bool

    True if the notification was cancelled by a subscriber, false otherwise

    View Source

    PublishCancelableAsync(ICancelableNotification)

    Publishes a cancelable notification to the notification subscribers

    Declaration
    public Task<bool> PublishCancelableAsync(ICancelableNotification notification)
    Parameters
    Type Name Description
    ICancelableNotification notification
    Returns
    Type Description
    Task<bool>

    True if the notification was cancelled by a subscriber, false otherwise

    View Source

    PublishScopedNotifications(IList<INotification>)

    Declaration
    protected virtual void PublishScopedNotifications(IList<INotification> notifications)
    Parameters
    Type Name Description
    IList<INotification> notifications
    View Source

    ScopeExit(bool)

    Invokes publishing of all pending notifications within the current scope

    Declaration
    public void ScopeExit(bool completed)
    Parameters
    Type Name Description
    bool completed
    View Source

    Suppress()

    Suppresses all notifications from being added/created until the result object is disposed.

    Declaration
    public IDisposable Suppress()
    Returns
    Type Description
    IDisposable
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX