CommunicatorEventArg.cs 898 B

1234567891011121314151617181920212223242526272829303132333435
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace Edge.Core.Processor.Communicator
  7. {
  8. public class CommunicatorEventArg<TRaw, TMessage> : EventArgs
  9. {
  10. public string SenderId { get; set; }
  11. /// <summary>
  12. /// could be used for passing anything
  13. /// </summary>
  14. public object GenericParameter { get; set; }
  15. public TRaw Data { get; set; }
  16. public TMessage Message { get; set; }
  17. public bool Continue { get; set; }
  18. }
  19. public class CommunicatorErrorMessageReadEventArg : EventArgs
  20. {
  21. public CommunicatorErrorMessageReadEventArg(byte[] rawData, string hint)
  22. {
  23. this.RawData = rawData;
  24. this.Hint = hint;
  25. }
  26. public byte[] RawData { get; set; }
  27. public string Hint { get; set; }
  28. }
  29. }