终端一体化运控平台
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

36 lines
961 B

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