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

loresoft / MediatR.CommandQuery / 11418431610

19 Oct 2024 02:43PM UTC coverage: 58.337% (+0.9%) from 57.424%
11418431610

push

github

pwelter34
add HybridCache, misc refactors

331 of 675 branches covered (49.04%)

Branch coverage included in aggregate %.

28 of 176 new or added lines in 24 files covered. (15.91%)

156 existing lines in 33 files now uncovered.

1163 of 1886 relevant lines covered (61.66%)

19.49 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

4
using MediatR.CommandQuery.Services;
5

6
namespace MediatR.CommandQuery.Queries;
7

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

15
        Ids = ids.ToList();
4✔
16
    }
4✔
17

18
    [NotNull]
19
    public IReadOnlyCollection<TKey> Ids { get; }
4✔
20

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

25
        foreach (var id in Ids)
×
26
            hash.Add(id);
×
27

NEW
28
        return CacheTagger.GetKey<TReadModel, int>(CacheTagger.Buckets.Identifiers, hash.ToHashCode());
×
29
    }
30

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