< Summary

Information
Class: Pozitron.QuerySpecification.IncludeExpression
Assembly: Pozitron.QuerySpecification
File(s): /home/runner/work/QuerySpecification/QuerySpecification/src/QuerySpecification/Expressions/IncludeExpression.cs
Tag: 44_11195777782
Line coverage
100%
Covered lines: 26
Uncovered lines: 0
Coverable lines: 26
Total lines: 51
Line coverage: 100%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_LambdaExpression()100%11100%
get_EntityType()100%11100%
get_PropertyType()100%11100%
get_PreviousPropertyType()100%11100%
get_Type()100%11100%
.ctor(...)100%22100%
.ctor(...)100%11100%
.ctor(...)100%11100%

File(s)

/home/runner/work/QuerySpecification/QuerySpecification/src/QuerySpecification/Expressions/IncludeExpression.cs

#LineLine coverage
 1namespace Pozitron.QuerySpecification;
 2
 3public class IncludeExpression
 4{
 655    public LambdaExpression LambdaExpression { get; }
 616    public Type EntityType { get; }
 617    public Type PropertyType { get; }
 348    public Type? PreviousPropertyType { get; }
 2399    public IncludeTypeEnum Type { get; }
 10
 11511    private IncludeExpression(
 11512        LambdaExpression expression,
 11513        Type entityType,
 11514        Type propertyType,
 11515        Type? previousPropertyType,
 11516        IncludeTypeEnum includeType)
 17
 18    {
 11519        ArgumentNullException.ThrowIfNull(expression);
 11420        ArgumentNullException.ThrowIfNull(entityType);
 11321        ArgumentNullException.ThrowIfNull(propertyType);
 22
 11223        if (includeType == IncludeTypeEnum.ThenInclude)
 24        {
 5225            ArgumentNullException.ThrowIfNull(previousPropertyType);
 26        }
 27
 11128        LambdaExpression = expression;
 11129        EntityType = entityType;
 11130        PropertyType = propertyType;
 11131        PreviousPropertyType = previousPropertyType;
 11132        Type = includeType;
 11133    }
 34
 35    public IncludeExpression(
 36        LambdaExpression expression,
 37        Type entityType,
 38        Type propertyType)
 6339        : this(expression, entityType, propertyType, null, IncludeTypeEnum.Include)
 40    {
 6041    }
 42
 43    public IncludeExpression(
 44        LambdaExpression expression,
 45        Type entityType,
 46        Type propertyType,
 47        Type previousPropertyType)
 5248        : this(expression, entityType, propertyType, previousPropertyType, IncludeTypeEnum.ThenInclude)
 49    {
 5150    }
 51}