// Copyright (c) The Geekeey Authors
// SPDX-License-Identifier: EUPL-1.2
namespace Geekeey.Request.Dispatcher;
///
/// Defines a strategy for publishing notifications to registered handlers.
///
public interface INotificationPublisher
{
///
/// Publishes the specified notification to the given collection of handlers.
///
/// The type of notification being published. Must implement .
/// The list of handlers to invoke.
/// The notification instance to publish.
/// A token to monitor for cancellation requests.
/// A task representing the asynchronous publish operation.
Task PublishAsync(IEnumerable> handlers, TNotification notification, CancellationToken cancellationToken) where TNotification : INotification;
}