终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

39 regels
1.2 KiB

  1. /* ==============================================================================
  2. * 功能描述:
  3. * 创 建 者:张原川
  4. * 创建日期:2016/10/10 16:50:12
  5. * ==============================================================================*/
  6. namespace BPASmartClient.EventBus
  7. {
  8. /// <summary>
  9. ///
  10. /// </summary>
  11. public static class IEventExtends
  12. {
  13. #region Methods - Public
  14. /// <summary>
  15. /// 发布
  16. /// </summary>
  17. /// <typeparam name="TEvent"></typeparam>
  18. /// <param name="message"></param>
  19. public static void Publish<TEvent>(this TEvent message) where TEvent : class, IEvent
  20. {
  21. EventBus.GetInstance().Publish<TEvent>(message);
  22. }
  23. /// <summary>
  24. ///
  25. /// </summary>
  26. /// <typeparam name="TEvent"></typeparam>
  27. /// <param name="message"></param>
  28. /// <param name="eventCallBack"></param>
  29. public static void Publish<TEvent>(this TEvent message, EventBus.EventCallBackHandle eventCallBack) where TEvent : class, IEvent
  30. {
  31. EventBus.GetInstance().Publish<TEvent>(message, eventCallBack);
  32. }
  33. #endregion
  34. }
  35. }