Added plugin events
This commit is contained in:
14
src/HopFrame.Core/Callbacks/ICallbackEmitter.cs
Normal file
14
src/HopFrame.Core/Callbacks/ICallbackEmitter.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
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();
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user