< Summary

Information
Class: Pozitron.QuerySpecification.SpecLike<T>
Assembly: Pozitron.QuerySpecification
File(s): /home/runner/work/QuerySpecification/QuerySpecification/src/QuerySpecification/Internals/SpecLike.cs
Tag: 52_11740816328
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 31
Line coverage: 100%
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
get_KeySelector()100%11100%
get_Pattern()100%11100%
.ctor(...)100%11100%

File(s)

/home/runner/work/QuerySpecification/QuerySpecification/src/QuerySpecification/Internals/SpecLike.cs

#LineLine coverage
 1using System.Diagnostics;
 2
 3namespace Pozitron.QuerySpecification;
 4
 5internal sealed class SpecLike<T>
 6{
 1687    public Expression<Func<T, string?>> KeySelector { get; }
 948    public string Pattern { get; }
 9
 7410    public SpecLike(Expression<Func<T, string?>> keySelector, string pattern)
 11    {
 12        Debug.Assert(keySelector is not null);
 13        Debug.Assert(!string.IsNullOrEmpty(pattern));
 7414        KeySelector = keySelector;
 7415        Pattern = pattern;
 7416    }
 17}
 18
 19internal sealed class SpecLikeCompiled<T>
 20{
 21    public Func<T, string?> KeySelector { get; }
 22    public string Pattern { get; }
 23
 24    public SpecLikeCompiled(Func<T, string?> keySelector, string pattern)
 25    {
 26        Debug.Assert(keySelector is not null);
 27        Debug.Assert(!string.IsNullOrEmpty(pattern));
 28        KeySelector = keySelector;
 29        Pattern = pattern;
 30    }
 31}