jellyfin-server/MediaBrowser.Model/Updates/PackageVersionInfo.cs

95 lines
2.7 KiB
C#
Raw Normal View History

2014-07-02 18:34:08 +00:00
using System;
2016-10-22 02:08:34 +00:00
using MediaBrowser.Model.Serialization;
2014-07-02 18:34:08 +00:00
2013-02-21 01:33:05 +00:00
namespace MediaBrowser.Model.Updates
{
/// <summary>
/// Class PackageVersionInfo
/// </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; }
2013-02-21 01:33:05 +00:00
/// <summary>
/// Gets or sets the version STR.
/// </summary>
/// <value>The version STR.</value>
public string versionStr { get; set; }
2014-07-02 18:34:08 +00:00
/// <summary>
/// The _version
/// </summary>
private Version _version;
/// <summary>
/// Gets or sets the version.
/// Had to make this an interpreted property since Protobuf can't handle Version
/// </summary>
/// <value>The version.</value>
[IgnoreDataMember]
public Version version
{
get { return _version ?? (_version = new Version(ValueOrDefault(versionStr, "0.0.0.1"))); }
}
/// <summary>
/// Values the or default.
/// </summary>
/// <param name="str">The STR.</param>
/// <param name="def">The def.</param>
/// <returns>System.String.</returns>
private static string ValueOrDefault(string str, string def)
{
return string.IsNullOrEmpty(str) ? def : str;
}
2013-02-21 01:33:05 +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>
2014-05-08 20:09:53 +00:00
public string checksum { get; set; }
2013-02-21 01:33:05 +00:00
/// <summary>
/// Gets or sets the target filename.
/// </summary>
/// <value>The target filename.</value>
public string targetFilename { get; set; }
2016-04-03 18:23:17 +00:00
public string infoUrl { get; set; }
2017-08-24 19:52:19 +00:00
public string runtimes { get; set; }
2013-02-21 01:33:05 +00:00
}
2014-07-02 18:34:08 +00:00
}