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

77 lines
2.2 KiB
C#
Raw Normal View History

2020-12-06 23:48:54 +00:00
#nullable enable
2020-06-03 09:54:01 +00:00
2020-12-06 23:48:54 +00:00
using SysVersion = System.Version;
namespace MediaBrowser.Model.Updates
{
/// <summary>
/// Class PackageVersionInfo.
/// </summary>
public class VersionInfo
{
2020-12-06 23:48:54 +00:00
private SysVersion? _version;
2020-11-19 13:34:09 +00:00
/// <summary>
/// Gets or sets the version.
/// </summary>
/// <value>The version.</value>
2020-12-06 23:48:54 +00:00
public string Version
2020-11-19 13:34:09 +00:00
{
2020-12-06 23:48:54 +00:00
get => _version == null ? string.Empty : _version.ToString();
2020-11-19 13:34:09 +00:00
2020-12-06 23:48:54 +00:00
set => _version = SysVersion.Parse(value);
2020-11-19 13:34:09 +00:00
}
/// <summary>
2020-12-06 23:48:54 +00:00
/// Gets the version as a <see cref="SysVersion"/>.
2020-11-19 13:34:09 +00:00
/// </summary>
2020-12-06 23:48:54 +00:00
public SysVersion VersionNumber => _version ?? new SysVersion(0, 0, 0);
/// <summary>
/// Gets or sets the changelog for this version.
/// </summary>
/// <value>The changelog.</value>
2020-12-06 23:48:54 +00:00
public string? Changelog { get; set; }
/// <summary>
2020-04-11 10:54:33 +00:00
/// Gets or sets the ABI that this version was built against.
/// </summary>
2020-04-11 10:54:33 +00:00
/// <value>The target ABI version.</value>
2020-12-06 23:48:54 +00:00
public string? TargetAbi { get; set; }
/// <summary>
/// Gets or sets the maximum ABI that this version will work with.
/// </summary>
/// <value>The target ABI version.</value>
public string? MaxAbi { get; set; }
/// <summary>
/// Gets or sets the source URL.
/// </summary>
/// <value>The source URL.</value>
2020-12-06 23:48:54 +00:00
public string? SourceUrl { get; set; }
/// <summary>
/// Gets or sets a checksum for the binary.
/// </summary>
/// <value>The checksum.</value>
2020-12-06 23:48:54 +00:00
public string? Checksum { get; set; }
/// <summary>
/// Gets or sets a timestamp of when the binary was built.
/// </summary>
/// <value>The timestamp.</value>
2020-12-06 23:48:54 +00:00
public string? Timestamp { get; set; }
2020-11-19 13:34:09 +00:00
/// <summary>
/// Gets or sets the repository name.
/// </summary>
2020-12-06 23:48:54 +00:00
public string RepositoryName { get; set; } = string.Empty;
2020-11-19 13:34:09 +00:00
/// <summary>
/// Gets or sets the repository url.
/// </summary>
2020-12-06 23:48:54 +00:00
public string RepositoryUrl { get; set; } = string.Empty;
}
}