Added support for sync notification handlers in the event aggregator

This commit is contained in:
Bjarke Berg
2021-01-19 09:57:55 +01:00
parent 9d0665e66c
commit 69724d8d2b
11 changed files with 146 additions and 27 deletions

View File

@@ -12,6 +12,20 @@ namespace Umbraco.Core.Events
/// <typeparam name="TNotification">The type of notification being handled.</typeparam>
public interface INotificationHandler<in TNotification>
where TNotification : INotification
{
/// <summary>
/// Handles a notification
/// </summary>
/// <param name="notification">The notification</param>
void Handle(TNotification notification);
}
/// <summary>
/// Defines a handler for a async notification.
/// </summary>
/// <typeparam name="TNotification">The type of notification being handled.</typeparam>
public interface INotificationAsyncHandler<in TNotification>
where TNotification : INotification
{
/// <summary>
/// Handles a notification