2020-04-05 09:10:56 -07:00
|
|
|
#nullable disable
|
2020-02-03 17:49:27 -07:00
|
|
|
#pragma warning disable CS1591
|
|
|
|
|
2019-09-01 23:19:29 -07:00
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
2018-12-27 16:27:57 -07:00
|
|
|
namespace MediaBrowser.Model.Querying
|
|
|
|
{
|
|
|
|
public class QueryResult<T>
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the items.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The items.</value>
|
2019-09-01 23:19:29 -07:00
|
|
|
public IReadOnlyList<T> Items { get; set; }
|
2018-12-27 16:27:57 -07:00
|
|
|
|
|
|
|
/// <summary>
|
2020-06-15 15:37:52 -07:00
|
|
|
/// The total number of records available.
|
2018-12-27 16:27:57 -07:00
|
|
|
/// </summary>
|
|
|
|
/// <value>The total record count.</value>
|
|
|
|
public int TotalRecordCount { get; set; }
|
|
|
|
|
2019-12-10 10:30:44 -07:00
|
|
|
/// <summary>
|
|
|
|
/// The index of the first record in Items.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>First record index.</value>
|
|
|
|
public int StartIndex { get; set; }
|
|
|
|
|
2018-12-27 16:27:57 -07:00
|
|
|
public QueryResult()
|
|
|
|
{
|
2019-09-01 23:19:29 -07:00
|
|
|
Items = Array.Empty<T>();
|
2018-12-27 16:27:57 -07:00
|
|
|
}
|
2020-02-19 13:56:35 -07:00
|
|
|
|
|
|
|
public QueryResult(IReadOnlyList<T> items)
|
|
|
|
{
|
|
|
|
Items = items;
|
|
|
|
TotalRecordCount = items.Count;
|
|
|
|
}
|
2018-12-27 16:27:57 -07:00
|
|
|
}
|
|
|
|
}
|