View Source
Class ScopedNotificationPublisher<TNotificationHandler>
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
View Source
PublishCancelable(ICancelableNotification)
Publishes a cancelable notification to the notification subscribers
Declaration
public bool PublishCancelable(ICancelableNotification notification)
Parameters
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
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
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 |
|