PackageVersionInfo.cs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. #pragma warning disable CS1591
  2. using System;
  3. using System.Text.Json.Serialization;
  4. namespace MediaBrowser.Model.Updates
  5. {
  6. /// <summary>
  7. /// Class PackageVersionInfo.
  8. /// </summary>
  9. public class PackageVersionInfo
  10. {
  11. /// <summary>
  12. /// Gets or sets the name.
  13. /// </summary>
  14. /// <value>The name.</value>
  15. public string name { get; set; }
  16. /// <summary>
  17. /// Gets or sets the guid.
  18. /// </summary>
  19. /// <value>The guid.</value>
  20. public string guid { get; set; }
  21. /// <summary>
  22. /// Gets or sets the version STR.
  23. /// </summary>
  24. /// <value>The version STR.</value>
  25. public string versionStr { get; set; }
  26. /// <summary>
  27. /// The _version
  28. /// </summary>
  29. private Version _version;
  30. /// <summary>
  31. /// Gets or sets the version.
  32. /// Had to make this an interpreted property since Protobuf can't handle Version
  33. /// </summary>
  34. /// <value>The version.</value>
  35. [JsonIgnore]
  36. public Version Version
  37. {
  38. get
  39. {
  40. if (_version == null)
  41. {
  42. var ver = versionStr;
  43. _version = new Version(string.IsNullOrEmpty(ver) ? "0.0.0.1" : ver);
  44. }
  45. return _version;
  46. }
  47. }
  48. /// <summary>
  49. /// Gets or sets the classification.
  50. /// </summary>
  51. /// <value>The classification.</value>
  52. public PackageVersionClass classification { get; set; }
  53. /// <summary>
  54. /// Gets or sets the description.
  55. /// </summary>
  56. /// <value>The description.</value>
  57. public string description { get; set; }
  58. /// <summary>
  59. /// Gets or sets the required version STR.
  60. /// </summary>
  61. /// <value>The required version STR.</value>
  62. public string requiredVersionStr { get; set; }
  63. /// <summary>
  64. /// Gets or sets the source URL.
  65. /// </summary>
  66. /// <value>The source URL.</value>
  67. public string sourceUrl { get; set; }
  68. /// <summary>
  69. /// Gets or sets the source URL.
  70. /// </summary>
  71. /// <value>The source URL.</value>
  72. public string checksum { get; set; }
  73. /// <summary>
  74. /// Gets or sets the target filename.
  75. /// </summary>
  76. /// <value>The target filename.</value>
  77. public string targetFilename { get; set; }
  78. public string infoUrl { get; set; }
  79. public string runtimes { get; set; }
  80. }
  81. }