EventServiceCallback.cs 626 B

123456789101112131415161718192021222324252627
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using Aitex.Core.RT.Event;
  6. using Aitex.Core.Util;
  7. using System.ServiceModel;
  8. using Aitex.Core.WCF.Interface;
  9. using System.IO;
  10. namespace Aitex.Core.WCF
  11. {
  12. [CallbackBehavior(ConcurrencyMode=ConcurrencyMode.Multiple, UseSynchronizationContext=false)]
  13. public class EventServiceCallback : IEventServiceCallback
  14. {
  15. public event Action<EventItem> FireEvent;
  16. public void SendEvent(EventItem ev)
  17. {
  18. if (FireEvent != null)
  19. {
  20. FireEvent(ev);
  21. }
  22. }
  23. }
  24. }