|
- /* ==============================================================================
- * 功能描述:
- * 创 建 者:张原川
- * 创建日期:2016/10/10 16:50:12
- * ==============================================================================*/
-
- namespace BPASmartClient.EventBus
- {
- /// <summary>
- ///
- /// </summary>
- public static class IEventExtends
- {
-
- #region Methods - Public
- /// <summary>
- /// 发布
- /// </summary>
- /// <typeparam name="TEvent"></typeparam>
- /// <param name="message"></param>
- public static void Publish<TEvent>(this TEvent message) where TEvent : class, IEvent
- {
- EventBus.GetInstance().Publish<TEvent>(message);
- }
- /// <summary>
- ///
- /// </summary>
- /// <typeparam name="TEvent"></typeparam>
- /// <param name="message"></param>
- /// <param name="eventCallBack"></param>
- public static void Publish<TEvent>(this TEvent message, EventBus.EventCallBackHandle eventCallBack) where TEvent : class, IEvent
- {
- EventBus.GetInstance().Publish<TEvent>(message, eventCallBack);
- }
-
- #endregion
- }
- }
|