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.

63 lines
1.8 KiB

  1. //-----------------------------------------------------------------------
  2. // <copyright file="CMessageBase.cs" company="Origtek">
  3. // CMessageBase belongs to Copyright (c) Origtek. All rights reserved.
  4. // </copyright>
  5. //-----------------------------------------------------------------------
  6. using Newtonsoft.Json;
  7. using System.Collections.Generic;
  8. namespace OT.COM.SignalerMessage
  9. {
  10. /// <summary>
  11. /// Base of all message
  12. /// </summary>
  13. public class CMessageBase
  14. {
  15. /// <summary>
  16. /// Initializes a new instance of the <see cref="CMessageBase" /> class
  17. /// </summary>
  18. public CMessageBase()
  19. {
  20. this.param = new Dictionary<string, object>();
  21. }
  22. // 輔助Plugin Routing
  23. /// <summary>
  24. /// Gets or sets support plugin Routing
  25. /// </summary>
  26. public string project { get; set; }
  27. // 輔助Plugin Routing
  28. /// <summary>
  29. /// Gets or sets support plugin Routing
  30. /// </summary>
  31. public string projectver { get; set; }
  32. // 區分此Message主要用途分類
  33. /// <summary>
  34. /// Gets or sets main category message
  35. /// </summary>
  36. public string module { get; set; }
  37. // 區分此Message次要用途分類
  38. /// <summary>
  39. /// Gets or sets sub category message
  40. /// </summary>
  41. public string method { get; set; }
  42. /// <summary>
  43. /// Gets or sets parameters
  44. /// </summary>
  45. public Dictionary<string, object> param { get; set; }
  46. [JsonIgnore]
  47. /// <summary>
  48. /// Only for backend usage
  49. /// </summary>
  50. public Dictionary<string, object> system_param { get; set; } = new Dictionary<string, object>();
  51. }
  52. }