Initial Commit ...
This commit is contained in:
@@ -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>;
|
||||
}
|
||||
}
|
||||
@@ -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 { }
|
||||
}
|
||||
Reference in New Issue
Block a user