Initial Commit ...

This commit is contained in:
2024-01-25 04:48:33 +03:30
commit 9eabf45f06
15 changed files with 1299 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
using xEventService.Models;
namespace xEventService.Interfaces {
public interface IXEventBus {
bool Publish<T> (T @event) where T : XEvent;
bool Subscribe<TEvent, THandler> ()
where TEvent : XEvent
where THandler : IXEventHandler<TEvent>;
}
}
+11
View File
@@ -0,0 +1,11 @@
using System.Threading.Tasks;
using xEventService.Models;
namespace xEventService.Interfaces {
public interface IXEventHandler<in TEvent> : IXEventHandler
where TEvent : XEvent {
Task HandleAsync (TEvent @event);
}
public interface IXEventHandler { }
}