2020-02-04 00:49:27 +00:00
|
|
|
#pragma warning disable CS1591
|
|
|
|
|
2019-01-13 20:02:23 +00:00
|
|
|
using System;
|
2019-10-15 15:49:49 +00:00
|
|
|
using System.Text.Json.Serialization;
|
2018-12-27 23:27:57 +00:00
|
|
|
|
|
|
|
namespace MediaBrowser.Model.Updates
|
|
|
|
{
|
|
|
|
/// <summary>
|
2020-02-04 00:49:27 +00:00
|
|
|
/// Class PackageVersionInfo.
|
2018-12-27 23:27:57 +00:00
|
|
|
/// </summary>
|
|
|
|
public class PackageVersionInfo
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the name.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The name.</value>
|
|
|
|
public string name { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the guid.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The guid.</value>
|
|
|
|
public string guid { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the version STR.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The version STR.</value>
|
|
|
|
public string versionStr { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// The _version
|
|
|
|
/// </summary>
|
|
|
|
private Version _version;
|
2019-06-14 16:38:14 +00:00
|
|
|
|
2018-12-27 23:27:57 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the version.
|
|
|
|
/// Had to make this an interpreted property since Protobuf can't handle Version
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The version.</value>
|
2019-10-15 15:49:49 +00:00
|
|
|
[JsonIgnore]
|
2019-06-14 16:38:14 +00:00
|
|
|
public Version Version
|
2018-12-27 23:27:57 +00:00
|
|
|
{
|
2019-06-14 16:38:14 +00:00
|
|
|
get
|
|
|
|
{
|
|
|
|
if (_version == null)
|
|
|
|
{
|
|
|
|
var ver = versionStr;
|
|
|
|
_version = new Version(string.IsNullOrEmpty(ver) ? "0.0.0.1" : ver);
|
|
|
|
}
|
|
|
|
|
|
|
|
return _version;
|
|
|
|
}
|
2018-12-27 23:27:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the classification.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The classification.</value>
|
|
|
|
public PackageVersionClass classification { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the description.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The description.</value>
|
|
|
|
public string description { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the required version STR.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The required version STR.</value>
|
|
|
|
public string requiredVersionStr { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the source URL.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The source URL.</value>
|
|
|
|
public string sourceUrl { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the source URL.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The source URL.</value>
|
|
|
|
public string checksum { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the target filename.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The target filename.</value>
|
|
|
|
public string targetFilename { get; set; }
|
|
|
|
|
|
|
|
public string infoUrl { get; set; }
|
|
|
|
|
|
|
|
public string runtimes { get; set; }
|
|
|
|
}
|
2019-01-13 19:31:15 +00:00
|
|
|
}
|