Summary

Class:ProjectX.Models.PagedList`1
Assembly:ProjectX
File(s):C:\private\projects\projectx\backend\src\ProjectX\Models\PagedList.cs
Covered lines:16
Uncovered lines:0
Coverable lines:16
Total lines:31
Line coverage:100%
Branch coverage:50%

History

Metrics

MethodCyclomatic complexity  NPath complexity  Sequence coverage  Branch coverage  
.ctor()10100100
.ctor(...)2210066.67

File(s)

C:\private\projects\projectx\backend\src\ProjectX\Models\PagedList.cs

#LineLine coverage
 1using System.Collections.Generic;
 2using System.Linq;
 3
 4namespace ProjectX.Models
 5{
 6    public class PagedList<TItem>
 7    {
 108        public PagedList()
 9        {
 10
 1011        }
 12
 213        public PagedList(
 214            IEnumerable<TItem> items,
 215            int total,
 216            int skip = 0,
 217            int? take = null)
 18        {
 219            this.Items = items;
 220            this.Total = total;
 221            this.Skip = skip;
 22
 223             this.Take = take.HasValue ? take.Value : items.Count();
 224        }
 25
 2326        public int Total { get; set; }
 2227        public int Skip { get; set; }
 2228        public int Take { get; set; }
 2929        public IEnumerable<TItem> Items { get; set; }
 30    }
 31}