using MediaBrowser.Model.Extensions; using ProtoBuf; using System; using System.Runtime.Serialization; namespace MediaBrowser.Model.Updates { /// /// Class PackageVersionInfo /// [ProtoContract] public class PackageVersionInfo { /// /// Gets or sets the name. /// /// The name. [ProtoMember(1)] public string name { get; set; } /// /// Gets or sets the version STR. /// /// The version STR. [ProtoMember(2)] public string versionStr { get; set; } /// /// The _version /// private Version _version; /// /// Gets or sets the version. /// Had to make this an interpreted property since Protobuf can't handle Version /// /// The version. [IgnoreDataMember] public Version version { get { return _version ?? (_version = new Version(versionStr.ValueOrDefault("0.0.0.1"))); } } /// /// Gets or sets the classification. /// /// The classification. [ProtoMember(4)] public PackageVersionClass classification { get; set; } /// /// Gets or sets the description. /// /// The description. [ProtoMember(5)] public string description { get; set; } /// /// Gets or sets the required version STR. /// /// The required version STR. [ProtoMember(6)] public string requiredVersionStr { get; set; } /// /// Gets or sets the source URL. /// /// The source URL. [ProtoMember(8)] public string sourceUrl { get; set; } /// /// Gets or sets the source URL. /// /// The source URL. [ProtoMember(9)] public Guid checksum { get; set; } /// /// Gets or sets the target filename. /// /// The target filename. [ProtoMember(10)] public string targetFilename { get; set; } } }