< Summary - SonghayCore

Information
Class: Songhay.Models.PagedResultMeta
Assembly: SonghayCore
File(s): /home/rasx/sourceRoot/SonghayCore/SonghayCore/Models/PagedResultMeta.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 27
Line coverage: 100%
Branch coverage
50%
Covered branches: 1
Total branches: 2
Branch coverage: 50%
Method coverage

Method coverage is only available for sponsors.

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
get_PageIndex()100%1100%
get_PageCount()50%2100%
get_PageSize()100%1100%
get_TotalCount()100%1100%

File(s)

/home/rasx/sourceRoot/SonghayCore/SonghayCore/Models/PagedResultMeta.cs

#LineLine coverage
 1namespace Songhay.Models;
 2
 3/// <summary>
 4/// Defines the metadata for a paged set of data.
 5/// </summary>
 6public class PagedResultMeta
 7{
 8    /// <summary>
 9    /// Gets or sets the index of the page.
 10    /// </summary>
 111    public int PageIndex { get; set; }
 12
 13    /// <summary>
 14    /// Gets the page count.
 15    /// </summary>
 116    public int PageCount => PageSize > 0 ? Convert.ToInt32(Math.Ceiling((TotalCount / PageSize) * 1d)) + 1 : 0;
 17
 18    /// <summary>
 19    /// Gets or sets the size of the page.
 20    /// </summary>
 321    public int PageSize { get; set; }
 22
 23    /// <summary>
 24    /// Gets or sets the total count.
 25    /// </summary>
 226    public int TotalCount { get; set; }
 27}