separates classes to files
This commit is contained in:
@@ -22,27 +22,4 @@ namespace Umbraco.Core.Events
|
||||
Task PublishAsync<TNotification>(TNotification notification, CancellationToken cancellationToken = default)
|
||||
where TNotification : INotification;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A marker interface to represent a notification.
|
||||
/// </summary>
|
||||
public interface INotification
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defines a handler for a notification.
|
||||
/// </summary>
|
||||
/// <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>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
|
||||
Task HandleAsync(TNotification notification, CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
|
||||
12
src/Umbraco.Core/Events/INotification.cs
Normal file
12
src/Umbraco.Core/Events/INotification.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
// Copyright (c) Umbraco.
|
||||
// See LICENSE for more details.
|
||||
|
||||
namespace Umbraco.Core.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// A marker interface to represent a notification.
|
||||
/// </summary>
|
||||
public interface INotification
|
||||
{
|
||||
}
|
||||
}
|
||||
24
src/Umbraco.Core/Events/INotificationHandler.cs
Normal file
24
src/Umbraco.Core/Events/INotificationHandler.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
// Copyright (c) Umbraco.
|
||||
// See LICENSE for more details.
|
||||
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Umbraco.Core.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines a handler for a notification.
|
||||
/// </summary>
|
||||
/// <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>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
|
||||
Task HandleAsync(TNotification notification, CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user