< Summary - Jellyfin

Information
Class: MediaBrowser.Model.Drawing.ImageDimensions
Assembly: MediaBrowser.Model
File(s): /srv/git/jellyfin/MediaBrowser.Model/Drawing/ImageDimensions.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 7
Coverable lines: 7
Total lines: 45
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
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
.ctor(...)100%210%
Equals(...)0%620%
ToString()100%210%

File(s)

/srv/git/jellyfin/MediaBrowser.Model/Drawing/ImageDimensions.cs

#LineLine coverage
 1#pragma warning disable CS1591
 2
 3using System.Globalization;
 4
 5namespace MediaBrowser.Model.Drawing
 6{
 7    /// <summary>
 8    /// Struct ImageDimensions.
 9    /// </summary>
 10    public readonly struct ImageDimensions
 11    {
 12        public ImageDimensions(int width, int height)
 13        {
 14            Width = width;
 15            Height = height;
 016        }
 17
 18        /// <summary>
 19        /// Gets the height.
 20        /// </summary>
 21        /// <value>The height.</value>
 22        public int Height { get; }
 23
 24        /// <summary>
 25        /// Gets the width.
 26        /// </summary>
 27        /// <value>The width.</value>
 28        public int Width { get; }
 29
 30        public bool Equals(ImageDimensions size)
 31        {
 032            return Width.Equals(size.Width) && Height.Equals(size.Height);
 33        }
 34
 35        /// <inheritdoc />
 36        public override string ToString()
 37        {
 038            return string.Format(
 039                CultureInfo.InvariantCulture,
 040                "{0}-{1}",
 041                Width,
 042                Height);
 43        }
 44    }
 45}