diff options
| author | artiume <siderite@gmail.com> | 2020-02-23 10:57:52 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-23 10:57:52 -0500 |
| commit | 697aee5b0c7e485e69c821406dbc5547f5c78833 (patch) | |
| tree | b52ac1485deb9cfb13ea71e7e3abb845440aa7a1 /MediaBrowser.Model/Drawing/ImageDimensions.cs | |
| parent | 4becaf83dd60bc0e225e8320d18d7aae88d4057b (diff) | |
| parent | 0a55eb9106f21256c78b963e1751a0de9fb56207 (diff) | |
Merge pull request #21 from jellyfin/master
nightly
Diffstat (limited to 'MediaBrowser.Model/Drawing/ImageDimensions.cs')
| -rw-r--r-- | MediaBrowser.Model/Drawing/ImageDimensions.cs | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/MediaBrowser.Model/Drawing/ImageDimensions.cs b/MediaBrowser.Model/Drawing/ImageDimensions.cs index b546dbb25..160be11f0 100644 --- a/MediaBrowser.Model/Drawing/ImageDimensions.cs +++ b/MediaBrowser.Model/Drawing/ImageDimensions.cs @@ -1,39 +1,46 @@ #pragma warning disable CS1591 #pragma warning disable SA1600 +using System.Globalization; + namespace MediaBrowser.Model.Drawing { /// <summary> /// Struct ImageDimensions. /// </summary> - public struct ImageDimensions + public readonly struct ImageDimensions { + public ImageDimensions(int width, int height) + { + Width = width; + Height = height; + } + /// <summary> - /// Gets or sets the height. + /// Gets the height. /// </summary> /// <value>The height.</value> - public int Height { get; set; } + public int Height { get; } /// <summary> - /// Gets or sets the width. + /// Gets the width. /// </summary> /// <value>The width.</value> - public int Width { get; set; } + public int Width { get; } public bool Equals(ImageDimensions size) { return Width.Equals(size.Width) && Height.Equals(size.Height); } + /// <inheritdoc /> public override string ToString() { - return string.Format("{0}-{1}", Width, Height); - } - - public ImageDimensions(int width, int height) - { - Width = width; - Height = height; + return string.Format( + CultureInfo.InvariantCulture, + "{0}-{1}", + Width, + Height); } } } |
