QueryResult.cs 955 B

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