using System.Threading; using System.Threading.Tasks; namespace PhoenixLib.Events { public interface IAsyncEventPipeline { /// /// /// /// Task ProcessEventAsync(IAsyncEvent notification); /// /// Asynchronously send a notification to handlers of type T /// /// Notification object /// Optional cancellation token /// A task that represents the publish operation. Task ProcessEventAsync(T notification, CancellationToken cancellationToken = default) where T : IAsyncEvent; } }