QueryResult.cs 1000 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. public QueryResult()
  10. {
  11. Items = Array.Empty<T>();
  12. }
  13. public QueryResult(IReadOnlyList<T> items)
  14. {
  15. Items = items;
  16. TotalRecordCount = items.Count;
  17. }
  18. /// <summary>
  19. /// Gets or sets the items.
  20. /// </summary>
  21. /// <value>The items.</value>
  22. public IReadOnlyList<T> Items { get; set; }
  23. /// <summary>
  24. /// Gets or sets the total number of records available.
  25. /// </summary>
  26. /// <value>The total record count.</value>
  27. public int TotalRecordCount { get; set; }
  28. /// <summary>
  29. /// Gets or sets the index of the first record in Items.
  30. /// </summary>
  31. /// <value>First record index.</value>
  32. public int StartIndex { get; set; }
  33. }
  34. }