diff --git a/MediaBrowser.Model/Querying/QueryResult.cs b/MediaBrowser.Model/Querying/QueryResult.cs index ea843f34c..dd0d4fbfc 100644 --- a/MediaBrowser.Model/Querying/QueryResult.cs +++ b/MediaBrowser.Model/Querying/QueryResult.cs @@ -1,47 +1,60 @@ -#nullable disable -#pragma warning disable CS1591 - using System; using System.Collections.Generic; -namespace MediaBrowser.Model.Querying +namespace MediaBrowser.Model.Querying; + +/// +/// Query result container. +/// +/// The type of item contained in the query result. +public class QueryResult { - public class QueryResult + /// + /// Initializes a new instance of the class. + /// + public QueryResult() { - public QueryResult() - { - Items = Array.Empty(); - } - - public QueryResult(IReadOnlyList items) - { - Items = items; - TotalRecordCount = items.Count; - } - - public QueryResult(int? startIndex, int? totalRecordCount, IReadOnlyList items) - { - StartIndex = startIndex ?? 0; - TotalRecordCount = totalRecordCount ?? items.Count; - Items = items; - } - - /// - /// Gets or sets the items. - /// - /// The items. - public IReadOnlyList Items { get; set; } - - /// - /// Gets or sets the total number of records available. - /// - /// The total record count. - public int TotalRecordCount { get; set; } - - /// - /// Gets or sets the index of the first record in Items. - /// - /// First record index. - public int StartIndex { get; set; } + Items = Array.Empty(); } + + /// + /// Initializes a new instance of the class. + /// + /// The list of items. + public QueryResult(IReadOnlyList items) + { + Items = items; + TotalRecordCount = items.Count; + } + + /// + /// Initializes a new instance of the class. + /// + /// The start index that was used to build the item list. + /// The total count of items. + /// The list of items. + public QueryResult(int? startIndex, int? totalRecordCount, IReadOnlyList items) + { + StartIndex = startIndex ?? 0; + TotalRecordCount = totalRecordCount ?? items.Count; + Items = items; + } + + /// + /// Gets or sets the items. + /// + /// The items. + public IReadOnlyList Items { get; set; } + + /// + /// Gets or sets the total number of records available. + /// + /// The total record count. + public int TotalRecordCount { get; set; } + + /// + /// Gets or sets the index of the first record in Items. + /// + /// First record index. + public int StartIndex { get; set; } }