2
0

VersionInfo.cs 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #nullable enable
  2. using SysVersion = System.Version;
  3. namespace MediaBrowser.Model.Updates
  4. {
  5. /// <summary>
  6. /// Class PackageVersionInfo.
  7. /// </summary>
  8. public class VersionInfo
  9. {
  10. private SysVersion? _version;
  11. /// <summary>
  12. /// Gets or sets the version.
  13. /// </summary>
  14. /// <value>The version.</value>
  15. public string Version
  16. {
  17. get => _version == null ? string.Empty : _version.ToString();
  18. set => _version = SysVersion.Parse(value);
  19. }
  20. /// <summary>
  21. /// Gets the version as a <see cref="SysVersion"/>.
  22. /// </summary>
  23. public SysVersion VersionNumber => _version ?? new SysVersion(0, 0, 0);
  24. /// <summary>
  25. /// Gets or sets the changelog for this version.
  26. /// </summary>
  27. /// <value>The changelog.</value>
  28. public string? Changelog { get; set; }
  29. /// <summary>
  30. /// Gets or sets the ABI that this version was built against.
  31. /// </summary>
  32. /// <value>The target ABI version.</value>
  33. public string? TargetAbi { get; set; }
  34. /// <summary>
  35. /// Gets or sets the maximum ABI that this version will work with.
  36. /// </summary>
  37. /// <value>The target ABI version.</value>
  38. public string? MaxAbi { get; set; }
  39. /// <summary>
  40. /// Gets or sets the source URL.
  41. /// </summary>
  42. /// <value>The source URL.</value>
  43. public string? SourceUrl { get; set; }
  44. /// <summary>
  45. /// Gets or sets a checksum for the binary.
  46. /// </summary>
  47. /// <value>The checksum.</value>
  48. public string? Checksum { get; set; }
  49. /// <summary>
  50. /// Gets or sets a timestamp of when the binary was built.
  51. /// </summary>
  52. /// <value>The timestamp.</value>
  53. public string? Timestamp { get; set; }
  54. /// <summary>
  55. /// Gets or sets the repository name.
  56. /// </summary>
  57. public string RepositoryName { get; set; } = string.Empty;
  58. /// <summary>
  59. /// Gets or sets the repository url.
  60. /// </summary>
  61. public string RepositoryUrl { get; set; } = string.Empty;
  62. }
  63. }