MonItemGeneral.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System.Reflection;
  2. using System.Text.Json.Serialization;
  3. namespace Quadarax.Foundation.Core.QMonitor
  4. {
  5. [Serializable]
  6. public class MonItemGeneral
  7. {
  8. [JsonPropertyName("nam")]
  9. public string? Name { get; set; }
  10. [JsonPropertyName("cpt")]
  11. public string Caption { get; set; }
  12. [JsonPropertyName("dsc")]
  13. public string Description { get; set; }
  14. [JsonPropertyName("vty")]
  15. public MonViewType ViewType { get; set; }
  16. [JsonPropertyName("key")]
  17. public List<int> KeyOrdinals { get; set; } = new List<int>();
  18. public List<ItemDescriptor> Items { get; set; } = new List<ItemDescriptor>();
  19. public class ItemDescriptor
  20. {
  21. [JsonPropertyName("nme")]
  22. public string Name { get; set; }
  23. [JsonPropertyName("tnm")]
  24. public string TypeName { get; set; }
  25. [JsonPropertyName("lbl")]
  26. public string Label { get; set; }
  27. [JsonPropertyName("dsc")]
  28. public string Description { get; set; }
  29. [JsonPropertyName("ord")]
  30. public int Order { get; set; }
  31. [NonSerialized] public PropertyInfo? _propertyInfo;
  32. }
  33. public enum MonViewType
  34. {
  35. Item,
  36. List
  37. }
  38. }
  39. }