QueryResult.cs 974 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #nullable disable
  2. #pragma warning disable CS1591
  3. using System;
  4. using System.Collections.Generic;
  5. namespace MediaBrowser.Model.Querying
  6. {
  7. public class QueryResult<T>
  8. {
  9. /// <summary>
  10. /// Gets or sets the items.
  11. /// </summary>
  12. /// <value>The items.</value>
  13. public IReadOnlyList<T> Items { get; set; }
  14. /// <summary>
  15. /// The total number of records available.
  16. /// </summary>
  17. /// <value>The total record count.</value>
  18. public int TotalRecordCount { get; set; }
  19. /// <summary>
  20. /// The index of the first record in Items.
  21. /// </summary>
  22. /// <value>First record index.</value>
  23. public int StartIndex { get; set; }
  24. public QueryResult()
  25. {
  26. Items = Array.Empty<T>();
  27. }
  28. public QueryResult(IReadOnlyList<T> items)
  29. {
  30. Items = items;
  31. TotalRecordCount = items.Count;
  32. }
  33. }
  34. }