< Summary - SonghayCore

Information
Class: Songhay.Models.RestPagingMetadata
Assembly: SonghayCore
File(s): /home/rasx/sourceRoot/SonghayCore/SonghayCore/Models/RestPagingMetadata.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 21
Coverable lines: 21
Total lines: 75
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 12
Branch coverage: 0%
Method coverage

Method coverage is only available for sponsors.

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
get_ResultSetSize()100%10%
get_TotalSetSize()100%10%
get_StartPosition()100%10%
get_EndPosition()100%10%
get_FromDate()100%10%
get_ToDate()100%10%
get_NextUri()100%10%
get_PreviousUri()100%10%
ToShallowCopy()100%10%
ToString()0%120%

File(s)

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

#LineLine coverage
 1namespace Songhay.Models;
 2
 3/// <summary>
 4/// REST Paging Metadata
 5/// </summary>
 6public class RestPagingMetadata
 7{
 8    /// <summary>
 9    /// Gets or sets the size of the result set.
 10    /// </summary>
 011    public int ResultSetSize { get; set; }
 12
 13    /// <summary>
 14    /// Gets or sets the total size of the set.
 15    /// </summary>
 016    public int TotalSetSize { get; set; }
 17
 18    /// <summary>
 19    /// Gets or sets the start position.
 20    /// </summary>
 021    public int StartPosition { get; set; }
 22
 23    /// <summary>
 24    /// Gets or sets the end position.
 25    /// </summary>
 026    public int EndPosition { get; set; }
 27
 28    /// <summary>
 29    /// Gets or sets from date.
 30    /// </summary>
 031    public DateTime? FromDate { get; set; }
 32
 33    /// <summary>
 34    /// Gets or sets to date.
 35    /// </summary>
 036    public DateTime? ToDate { get; set; }
 37
 38    /// <summary>
 39    /// Gets or sets the next URI.
 40    /// </summary>
 041    public string? NextUri { get; set; }
 42
 43    /// <summary>
 44    /// Gets or sets the previous URI.
 45    /// </summary>
 046    public string? PreviousUri { get; set; }
 47
 48    /// <summary>
 49    /// Returns the shallow copy from <see cref="object.MemberwiseClone"/>.
 50    /// </summary>
 51    public RestPagingMetadata? ToShallowCopy()
 052    {
 053        return MemberwiseClone() as RestPagingMetadata;
 054    }
 55
 56    /// <summary>
 57    /// Returns a <see cref="String" /> that represents this instance.
 58    /// </summary>
 59    /// <returns>
 60    /// A <see cref="String" /> that represents this instance.
 61    /// </returns>
 62    public override string ToString()
 063    {
 064        var sb = new StringBuilder();
 065        sb.Append(
 066            $"resultSetSize: {ResultSetSize}, totalSetSize: {TotalSetSize}, startPosition: {StartPosition}, endPosition:
 67
 068        if (FromDate != null) sb.Append($", fromDate: {FromDate}");
 069        if (ToDate != null) sb.Append($", toDate: {ToDate}");
 070        if (NextUri != null) sb.Append($", nextUri: {NextUri}");
 071        if (PreviousUri != null) sb.Append($", previousUri: {PreviousUri}");
 72
 073        return sb.Length > 0 ? sb.ToString() : base.ToString() ?? GetType().Name;
 074    }
 75}