PackageVersionInfo.cs 2.6 KB

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