PackageVersionInfo.cs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. using MediaBrowser.Model.Extensions;
  2. using System;
  3. using System.Runtime.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 version STR.
  18. /// </summary>
  19. /// <value>The version STR.</value>
  20. public string versionStr { get; set; }
  21. /// <summary>
  22. /// The _version
  23. /// </summary>
  24. private Version _version;
  25. /// <summary>
  26. /// Gets or sets the version.
  27. /// Had to make this an interpreted property since Protobuf can't handle Version
  28. /// </summary>
  29. /// <value>The version.</value>
  30. [IgnoreDataMember]
  31. public Version version
  32. {
  33. get { return _version ?? (_version = new Version(versionStr.ValueOrDefault("0.0.0.1"))); }
  34. }
  35. /// <summary>
  36. /// Gets or sets the classification.
  37. /// </summary>
  38. /// <value>The classification.</value>
  39. public PackageVersionClass classification { get; set; }
  40. /// <summary>
  41. /// Gets or sets the description.
  42. /// </summary>
  43. /// <value>The description.</value>
  44. public string description { get; set; }
  45. /// <summary>
  46. /// Gets or sets the required version STR.
  47. /// </summary>
  48. /// <value>The required version STR.</value>
  49. public string requiredVersionStr { get; set; }
  50. /// <summary>
  51. /// Gets or sets the source URL.
  52. /// </summary>
  53. /// <value>The source URL.</value>
  54. public string sourceUrl { get; set; }
  55. /// <summary>
  56. /// Gets or sets the source URL.
  57. /// </summary>
  58. /// <value>The source URL.</value>
  59. public Guid checksum { get; set; }
  60. /// <summary>
  61. /// Gets or sets the target filename.
  62. /// </summary>
  63. /// <value>The target filename.</value>
  64. public string targetFilename { get; set; }
  65. }
  66. }