You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.2 KiB
C#
37 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace EntrustSettle.EventBus
|
|
{
|
|
/// <summary>
|
|
/// 事件总线订阅管理器
|
|
/// 接口
|
|
/// </summary>
|
|
public interface IEventBusSubscriptionsManager
|
|
{
|
|
bool IsEmpty { get; }
|
|
event EventHandler<string> OnEventRemoved;
|
|
void AddDynamicSubscription<TH>(string eventName)
|
|
where TH : IDynamicIntegrationEventHandler;
|
|
|
|
void AddSubscription<T, TH>()
|
|
where T : IntegrationEvent
|
|
where TH : IIntegrationEventHandler<T>;
|
|
|
|
void RemoveSubscription<T, TH>()
|
|
where TH : IIntegrationEventHandler<T>
|
|
where T : IntegrationEvent;
|
|
void RemoveDynamicSubscription<TH>(string eventName)
|
|
where TH : IDynamicIntegrationEventHandler;
|
|
|
|
bool HasSubscriptionsForEvent<T>() where T : IntegrationEvent;
|
|
bool HasSubscriptionsForEvent(string eventName);
|
|
Type GetEventTypeByName(string eventName);
|
|
void Clear();
|
|
IEnumerable<SubscriptionInfo> GetHandlersForEvent<T>() where T : IntegrationEvent;
|
|
IEnumerable<SubscriptionInfo> GetHandlersForEvent(string eventName);
|
|
string GetEventKey<T>();
|
|
}
|
|
|
|
}
|