• 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

41.67
/src/MediatR.CommandQuery/Queries/EntityIdentifiersQuery.cs
1
using System.Diagnostics.CodeAnalysis;
2
using System.Security.Claims;
3
using System.Text.Json.Serialization;
4

5
using MediatR.CommandQuery.Services;
6

7
namespace MediatR.CommandQuery.Queries;
8

9
public record EntityIdentifiersQuery<TKey, TReadModel> : CacheableQueryBase<IReadOnlyCollection<TReadModel>>
10
{
11
    public EntityIdentifiersQuery(ClaimsPrincipal? principal, [NotNull] IReadOnlyCollection<TKey> ids)
12
        : base(principal)
6✔
13
    {
14
        ArgumentNullException.ThrowIfNull(ids);
6✔
15

16
        Ids = ids;
6✔
17
    }
6✔
18

19
    [NotNull]
20
    [JsonPropertyName("ids")]
21
    public IReadOnlyCollection<TKey> Ids { get; }
6✔
22

23
    public override string GetCacheKey()
24
    {
25
        var hash = new HashCode();
×
26

UNCOV
27
        foreach (var id in Ids)
×
28
            hash.Add(id);
×
29

UNCOV
30
        return CacheTagger.GetKey<TReadModel, int>(CacheTagger.Buckets.Identifiers, hash.ToHashCode());
×
31
    }
32

33
    public override string? GetCacheTag()
UNCOV
34
        => CacheTagger.GetTag<TReadModel>();
×
35
}
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