// Copyright (c) Umbraco.
// See LICENSE for more details.
using System.Threading;
using System.Threading.Tasks;
using Umbraco.Cms.Core.Notifications;
namespace Umbraco.Cms.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
void Handle(TNotification notification);
}
///
/// Defines a handler for a async notification.
///
/// The type of notification being handled.
public interface INotificationAsyncHandler
where TNotification : INotification
{
///
/// Handles a notification
///
/// The notification
/// The cancellation token.
/// A representing the asynchronous operation.
Task HandleAsync(TNotification notification, CancellationToken cancellationToken);
}
}