< Summary

Information
Class: Elsa.Models.PagedListResponse<T>
Assembly: Elsa.Api.Common
File(s): /home/runner/work/elsa-core/elsa-core/src/common/Elsa.Api.Common/Models/PagedListResponse.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 9
Coverable lines: 9
Total lines: 21
Line coverage: 0%
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
.ctor()100%210%
.ctor(...)100%210%
get_Items()100%210%
get_TotalCount()100%210%
From(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/common/Elsa.Api.Common/Models/PagedListResponse.cs

#LineLine coverage
 1using Elsa.Common.Models;
 2
 3namespace Elsa.Models;
 4
 5public record PagedListResponse<T>: LinkedResource
 6{
 07    public PagedListResponse()
 8    {
 09    }
 10
 011    public PagedListResponse(Page<T> page)
 12    {
 013        Items = page.Items;
 014        TotalCount = page.TotalCount;
 015    }
 16
 017    public ICollection<T> Items { get; set; } = default!;
 018    public long TotalCount { get; set; }
 19
 020    public static PagedListResponse<T> From(Page<T> page) => new(page);
 21}