Files
HopFrame/src/HopFrame.Core/Callbacks/ICallbackEmitter.cs
2025-02-02 19:06:41 +01:00

14 lines
385 B
C#

namespace HopFrame.Core.Callbacks;
public interface ICallbackEmitter {
Guid RegisterCallbackHandler(string @event, Func<object, IServiceProvider, Task> handler);
bool RemoveCallbackHandler(Guid id);
Task DispatchCallback(string @event, object argument = null!);
void RemoveAllCallbackHandlers(string @event);
void RemoveAllCallbackHandlers();
}