• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

loresoft / MediatR.CommandQuery / 14067111219

25 Mar 2025 06:14PM UTC coverage: 59.397% (-0.5%) from 59.879%
14067111219

push

github

pwelter34
Update MediatorServiceExtensions.cs

495 of 971 branches covered (50.98%)

Branch coverage included in aggregate %.

0 of 3 new or added lines in 1 file covered. (0.0%)

113 existing lines in 15 files now uncovered.

1474 of 2344 relevant lines covered (62.88%)

22.57 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

64.44
/src/MediatR.CommandQuery/Queries/EntitySelect.cs
1
using System.Text.Json.Serialization;
2

3
namespace MediatR.CommandQuery.Queries;
4

5
public class EntitySelect
6
{
7
    [JsonConstructor]
8
    public EntitySelect()
36✔
9
    {
10

11
    }
36✔
12

13
    public EntitySelect(string? query, string? sort)
6✔
14
    {
15
        Query = query;
6✔
16

17
        var entitySort = EntitySort.Parse(sort);
6✔
18
        if (entitySort == null)
6✔
19
            return;
2✔
20

21
        Sort = new List<EntitySort> { entitySort };
4✔
22
    }
4✔
23

24
    public EntitySelect(EntityFilter? filter)
12✔
25
    {
26
        Filter = filter;
12✔
27
    }
12✔
28

29
    public EntitySelect(EntityFilter? filter, EntitySort? sort)
4✔
30
    {
31
        Filter = filter;
4✔
32

33
        if (sort != null)
4✔
34
            Sort = [sort];
4✔
35
    }
4✔
36

37
    public EntitySelect(EntityFilter? filter, IEnumerable<EntitySort>? sort)
2✔
38
    {
39
        Filter = filter;
2✔
40
        Sort = sort?.ToList();
2!
41
    }
2✔
42

43
    [JsonPropertyName("query")]
44
    [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
45
    public string? Query { get; set; }
54✔
46

47
    [JsonPropertyName("sort")]
48
    [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
49
    public IList<EntitySort>? Sort { get; set; }
90✔
50

51
    [JsonPropertyName("filter")]
52
    [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
53
    public EntityFilter? Filter { get; set; }
242✔
54

55
    public override int GetHashCode()
56
    {
57
        var hash = new HashCode();
×
58
        hash.Add(Query);
×
59

60
        if (Filter != null)
×
61
            hash.Add(Filter.GetHashCode());
×
62

63
        if (Sort == null)
×
64
            return hash.ToHashCode();
×
65

66
        foreach (var s in Sort)
×
UNCOV
67
            hash.Add(s.GetHashCode());
×
68

UNCOV
69
        return hash.ToHashCode();
×
70
    }
71
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc