namespace EventBus
{
    public interface IEventBroker
    {
        /// <summary>
        /// 根据数据类型获取事件句柄
        /// </summary>
        /// <typeparam name="TData">数据类型</typeparam>
        /// <returns>事件句柄</returns>
        IEventData<TData> GetEvent<TData>();
        /// <summary>
        /// 根据TData数据类型获取带返回值的事件句柄
        /// </summary>
        /// <typeparam name="TData">数据类型</typeparam>
        /// <typeparam name="T">返回数据类型</typeparam>
        /// <returns>事件句柄</returns>
        IEventData<TData, T> GetEvent<TData, T>();
        /// <summary>
        /// 根据<paramref name="eventName"/>获取事件句柄
        /// </summary>
        /// <param name="eventName">事件名称</param>
        /// <returns>事件句柄</returns>
        IAnonymousEventData GetEvent(string eventName);
        /// <summary>
        /// 根据<paramref name="eventName"/>获取事件句柄
        /// </summary>
        /// <param name="eventName">事件名称</param>
        /// <typeparam name="T">返回数据类型</typeparam>
        /// <returns>事件句柄</returns>
        IAnonymousEventData<T> GetEvent<T>(string eventName);
    }
}