diff --git a/src/Umbraco.Core/Events/IEventAggregator.cs b/src/Umbraco.Core/Events/IEventAggregator.cs index bd01ad0b57..d78aed36b7 100644 --- a/src/Umbraco.Core/Events/IEventAggregator.cs +++ b/src/Umbraco.Core/Events/IEventAggregator.cs @@ -22,27 +22,4 @@ namespace Umbraco.Core.Events Task PublishAsync(TNotification notification, CancellationToken cancellationToken = default) where TNotification : INotification; } - - /// - /// A marker interface to represent a notification. - /// - public interface INotification - { - } - - /// - /// Defines a handler for a notification. - /// - /// The type of notification being handled. - public interface INotificationHandler - where TNotification : INotification - { - /// - /// Handles a notification - /// - /// The notification - /// The cancellation token. - /// A representing the asynchronous operation. - Task HandleAsync(TNotification notification, CancellationToken cancellationToken); - } } diff --git a/src/Umbraco.Core/Events/INotification.cs b/src/Umbraco.Core/Events/INotification.cs new file mode 100644 index 0000000000..3030b0836f --- /dev/null +++ b/src/Umbraco.Core/Events/INotification.cs @@ -0,0 +1,12 @@ +// Copyright (c) Umbraco. +// See LICENSE for more details. + +namespace Umbraco.Core.Events +{ + /// + /// A marker interface to represent a notification. + /// + public interface INotification + { + } +} diff --git a/src/Umbraco.Core/Events/INotificationHandler.cs b/src/Umbraco.Core/Events/INotificationHandler.cs new file mode 100644 index 0000000000..dc5d83e0f7 --- /dev/null +++ b/src/Umbraco.Core/Events/INotificationHandler.cs @@ -0,0 +1,24 @@ +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System.Threading; +using System.Threading.Tasks; + +namespace Umbraco.Core.Events +{ + /// + /// Defines a handler for a notification. + /// + /// The type of notification being handled. + public interface INotificationHandler + where TNotification : INotification + { + /// + /// Handles a notification + /// + /// The notification + /// The cancellation token. + /// A representing the asynchronous operation. + Task HandleAsync(TNotification notification, CancellationToken cancellationToken); + } +}