mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-01 05:18:27 +01:00
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the height.
|
||||
/// </summary>
|
||||
/// <value>The height.</value>
|
||||
public int Height { get; set; }
|
||||
public ImageDimensions(int width, int height)
|
||||
{
|
||||
Width = width;
|
||||
Height = height;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the width.
|
||||
/// Gets the height.
|
||||
/// </summary>
|
||||
/// <value>The height.</value>
|
||||
public int Height { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,5 +30,11 @@ namespace MediaBrowser.Model.Querying
|
||||
{
|
||||
Items = Array.Empty<T>();
|
||||
}
|
||||
|
||||
public QueryResult(IReadOnlyList<T> items)
|
||||
{
|
||||
Items = items;
|
||||
TotalRecordCount = items.Count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user