Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Threading;
- using System.Threading.Tasks;
- namespace Hornet.Core.Storage.EventBus
- {
- public interface IEventBus
- {
- string Name { get; }
- Task PublishAsync<T>(T @event) where T : class, IEvent;
- void Subscribe<T>(string subscription, Func<T, CancellationToken, Task> onMessage) where T : class, IEvent;
- }
- }
Add Comment
Please, Sign In to add comment