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.
 
 
 

41 lines
800 B

  1. using System;
  2. using System.Collections.Generic;
  3. namespace SUISS.Cloud
  4. {
  5. public class Message
  6. {
  7. public Message(string toAccountUuid, string messageType, IDictionary<string, object> data)
  8. {
  9. this.ToAccountUuid = toAccountUuid;
  10. this.MessageType = messageType;
  11. this.Data = data;
  12. }
  13. public IDictionary<string, object> Data { get; private set; }
  14. public string MessageType { get; private set; }
  15. public string ToAccountUuid { get; private set; }
  16. public static IDictionary<string, object> ToJson(Message message)
  17. {
  18. return new Dictionary<string, object>
  19. {
  20. {
  21. "messageType",
  22. message.MessageType
  23. },
  24. {
  25. "data",
  26. message.Data
  27. },
  28. {
  29. "toAccountUuid",
  30. message.ToAccountUuid
  31. }
  32. };
  33. }
  34. }
  35. }