using ZeroFramework.EventBus.Abstractions; using ZeroFramework.EventBus.Events; using static ZeroFramework.EventBus.InMemoryEventBusSubscriptionsManager; namespace ZeroFramework.EventBus { public interface IEventBusSubscriptionsManager { bool IsEmpty { get; } event EventHandler OnEventRemoved; void AddDynamicSubscription(string eventName) where TH : IDynamicIntegrationEventHandler; void RemoveDynamicSubscription(string eventName) where TH : IDynamicIntegrationEventHandler; void AddSubscription() where T : IntegrationEvent where TH : IIntegrationEventHandler; void RemoveSubscription() where TH : IIntegrationEventHandler where T : IntegrationEvent; bool HasSubscriptionsForEvent() where T : IntegrationEvent; bool HasSubscriptionsForEvent(string eventName); Type GetEventTypeByName(string eventName); void Clear(); IEnumerable GetHandlersForEvent() where T : IntegrationEvent; IEnumerable GetHandlersForEvent(string eventName); string GetEventKey(); } }