diff options
| author | stefan <stefan@hegedues.at> | 2018-09-12 19:26:21 +0200 |
|---|---|---|
| committer | stefan <stefan@hegedues.at> | 2018-09-12 19:26:21 +0200 |
| commit | 48facb797ed912e4ea6b04b17d1ff190ac2daac4 (patch) | |
| tree | 8dae77a31670a888d733484cb17dd4077d5444e8 /MediaBrowser.Model/Drawing/ImageSize.cs | |
| parent | c32d8656382a0eacb301692e0084377fc433ae9b (diff) | |
Update to 3.5.2 and .net core 2.1
Diffstat (limited to 'MediaBrowser.Model/Drawing/ImageSize.cs')
| -rw-r--r-- | MediaBrowser.Model/Drawing/ImageSize.cs | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/MediaBrowser.Model/Drawing/ImageSize.cs b/MediaBrowser.Model/Drawing/ImageSize.cs deleted file mode 100644 index c2b0291bd..000000000 --- a/MediaBrowser.Model/Drawing/ImageSize.cs +++ /dev/null @@ -1,93 +0,0 @@ -using System.Globalization; - -namespace MediaBrowser.Model.Drawing -{ - /// <summary> - /// Struct ImageSize - /// </summary> - public struct ImageSize - { - private double _height; - private double _width; - - /// <summary> - /// Gets or sets the height. - /// </summary> - /// <value>The height.</value> - public double Height - { - get - { - return _height; - } - set - { - _height = value; - } - } - - /// <summary> - /// Gets or sets the width. - /// </summary> - /// <value>The width.</value> - public double Width - { - get { return _width; } - set { _width = value; } - } - - public bool Equals(ImageSize size) - { - return Width.Equals(size.Width) && Height.Equals(size.Height); - } - - public override string ToString() - { - return string.Format("{0}-{1}", Width, Height); - } - - public ImageSize(string value) - { - _width = 0; - - _height = 0; - - ParseValue(value); - } - - public ImageSize(int width, int height) - { - _width = width; - _height = height; - } - - public ImageSize(double width, double height) - { - _width = width; - _height = height; - } - - private void ParseValue(string value) - { - if (!string.IsNullOrEmpty(value)) - { - string[] parts = value.Split('-'); - - if (parts.Length == 2) - { - double val; - - if (double.TryParse(parts[0], NumberStyles.Any, CultureInfo.InvariantCulture, out val)) - { - _width = val; - } - - if (double.TryParse(parts[1], NumberStyles.Any, CultureInfo.InvariantCulture, out val)) - { - _height = val; - } - } - } - } - } -}
\ No newline at end of file |
