using ZeroFramework.EventBus.Events; namespace ZeroFramework.EventBus.Abstractions { public interface IEventBus { Task PublishAsync(IntegrationEvent @event, CancellationToken cancellationToken = default); void Subscribe() where T : IntegrationEvent where TH : IIntegrationEventHandler; void Unsubscribe() where T : IntegrationEvent where TH : IIntegrationEventHandler; void SubscribeDynamic(string eventName) where TH : IDynamicIntegrationEventHandler; void UnsubscribeDynamic(string eventName) where TH : IDynamicIntegrationEventHandler; } }