< Summary

Information
Class: Pozitron.QuerySpecification.PaginationSettings
Assembly: Pozitron.QuerySpecification
File(s): /home/runner/work/QuerySpecification/QuerySpecification/src/QuerySpecification/Paging/PaginationSettings.cs
Tag: 52_11740816328
Line coverage
100%
Covered lines: 9
Uncovered lines: 0
Coverable lines: 9
Total lines: 40
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_DefaultPage()100%11100%
get_DefaultPageSize()100%11100%
get_DefaultPageSizeLimit()100%11100%
get_Default()100%11100%
.ctor()100%11100%
.ctor(...)100%11100%

File(s)

/home/runner/work/QuerySpecification/QuerySpecification/src/QuerySpecification/Paging/PaginationSettings.cs

#LineLine coverage
 1namespace Pozitron.QuerySpecification;
 2
 3/// <summary>
 4/// Represents pagination settings.
 5/// </summary>
 6public record PaginationSettings
 7{
 8    /// <summary>
 9    /// Gets the default page number.
 10    /// </summary>
 1811    public int DefaultPage { get; } = 1;
 12
 13    /// <summary>
 14    /// Gets the default page size.
 15    /// </summary>
 2016    public int DefaultPageSize { get; } = 10;
 17
 18    /// <summary>
 19    /// Gets the default page size limit.
 20    /// </summary>
 5521    public int DefaultPageSizeLimit { get; } = 50;
 22
 23    /// <summary>
 24    /// Gets the default pagination settings.
 25    /// </summary>
 7126    public static PaginationSettings Default { get; } = new();
 27
 428    private PaginationSettings() { }
 29
 30    /// <summary>
 31    /// Initializes a new instance of the <see cref="PaginationSettings"/> class with the specified default page size an
 32    /// </summary>
 33    /// <param name="defaultPageSize">The default page size.</param>
 34    /// <param name="defaultPageSizeLimit">The default page size limit.</param>
 535    public PaginationSettings(int defaultPageSize, int defaultPageSizeLimit)
 36    {
 537        DefaultPageSize = defaultPageSize;
 538        DefaultPageSizeLimit = defaultPageSizeLimit;
 539    }
 40}