< Summary - Jellyfin

Information
Class: MediaBrowser.Model.Updates.VersionInfo
Assembly: MediaBrowser.Model
File(s): /srv/git/jellyfin/MediaBrowser.Model/Updates/VersionInfo.cs
Line coverage
66%
Covered lines: 2
Uncovered lines: 1
Coverable lines: 3
Total lines: 77
Line coverage: 66.6%
Branch coverage
25%
Covered branches: 1
Total branches: 4
Branch coverage: 25%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Version()50%22100%
set_Version(...)100%11100%
get_VersionNumber()0%620%

File(s)

/srv/git/jellyfin/MediaBrowser.Model/Updates/VersionInfo.cs

#LineLine coverage
 1using System.Text.Json.Serialization;
 2using SysVersion = System.Version;
 3
 4namespace MediaBrowser.Model.Updates
 5{
 6    /// <summary>
 7    /// Defines the <see cref="VersionInfo"/> class.
 8    /// </summary>
 9    public class VersionInfo
 10    {
 11        private SysVersion? _version;
 12
 13        /// <summary>
 14        /// Gets or sets the version.
 15        /// </summary>
 16        /// <value>The version.</value>
 17        [JsonPropertyName("version")]
 18        public string Version
 19        {
 1020            get => _version is null ? string.Empty : _version.ToString();
 21
 16622            set => _version = SysVersion.Parse(value);
 23        }
 24
 25        /// <summary>
 26        /// Gets the version as a <see cref="SysVersion"/>.
 27        /// </summary>
 028        public SysVersion VersionNumber => _version ?? new SysVersion(0, 0, 0);
 29
 30        /// <summary>
 31        /// Gets or sets the changelog for this version.
 32        /// </summary>
 33        /// <value>The changelog.</value>
 34        [JsonPropertyName("changelog")]
 35        public string? Changelog { get; set; }
 36
 37        /// <summary>
 38        /// Gets or sets the ABI that this version was built against.
 39        /// </summary>
 40        /// <value>The target ABI version.</value>
 41        [JsonPropertyName("targetAbi")]
 42        public string? TargetAbi { get; set; }
 43
 44        /// <summary>
 45        /// Gets or sets the source URL.
 46        /// </summary>
 47        /// <value>The source URL.</value>
 48        [JsonPropertyName("sourceUrl")]
 49        public string? SourceUrl { get; set; }
 50
 51        /// <summary>
 52        /// Gets or sets a checksum for the binary.
 53        /// </summary>
 54        /// <value>The checksum.</value>
 55        [JsonPropertyName("checksum")]
 56        public string? Checksum { get; set; }
 57
 58        /// <summary>
 59        /// Gets or sets a timestamp of when the binary was built.
 60        /// </summary>
 61        /// <value>The timestamp.</value>
 62        [JsonPropertyName("timestamp")]
 63        public string? Timestamp { get; set; }
 64
 65        /// <summary>
 66        /// Gets or sets the repository name.
 67        /// </summary>
 68        [JsonPropertyName("repositoryName")]
 69        public string RepositoryName { get; set; } = string.Empty;
 70
 71        /// <summary>
 72        /// Gets or sets the repository url.
 73        /// </summary>
 74        [JsonPropertyName("repositoryUrl")]
 75        public string RepositoryUrl { get; set; } = string.Empty;
 76    }
 77}