using System;
using System.Collections.Generic;
namespace EntrustSettle.EventBus
{
///
/// 事件总线订阅管理器
/// 接口
///
public interface IEventBusSubscriptionsManager
{
bool IsEmpty { get; }
event EventHandler OnEventRemoved;
void AddDynamicSubscription(string eventName)
where TH : IDynamicIntegrationEventHandler;
void AddSubscription()
where T : IntegrationEvent
where TH : IIntegrationEventHandler;
void RemoveSubscription()
where TH : IIntegrationEventHandler
where T : IntegrationEvent;
void RemoveDynamicSubscription(string eventName)
where TH : IDynamicIntegrationEventHandler;
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();
}
}
| |