Passed cancellation tokens to event handlers if needed

This commit is contained in:
2025-02-05 16:47:47 +01:00
parent 13e9af892c
commit fb761c74d2
5 changed files with 73 additions and 61 deletions

View File

@@ -1,5 +1,7 @@
namespace HopFrame.Web.Plugins;
using HopFrame.Web.Plugins.Events;
namespace HopFrame.Web.Plugins;
public interface IPluginOrchestrator {
public Task<TEvent> DispatchEvent<TEvent>(TEvent @event, CancellationToken ct = new());
public Task<TEvent> DispatchEvent<TEvent>(TEvent @event, CancellationToken ct = new()) where TEvent : HopFrameEventArgs;
}