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

lucaslorentz / auto-compute / 20057011414

09 Dec 2025 08:21AM UTC coverage: 81.626% (-1.1%) from 82.723%
20057011414

push

github

lucaslorentz
Use EFCoreChangeset to calculate original member values

212 of 275 new or added lines in 14 files covered. (77.09%)

1 existing line in 1 file now uncovered.

1888 of 2313 relevant lines covered (81.63%)

963.86 hits per line

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

92.31
/src/LLL.AutoCompute/ObservedNavigationChange.cs
1
namespace LLL.AutoCompute;
2

3
/// <summary>
4
/// Represents changes that happened to a navigation property of an entity.
5
/// </summary>
6
public class ObservedNavigationChange(object entity)
474✔
7
{
8
    private readonly HashSet<object> _added = [];
474✔
9
    private readonly HashSet<object> _removed = [];
474✔
10

11
    /// <summary>The entity that had this navigation change.</summary>
12
    public object Entity => entity;
2,264✔
13

14
    /// <summary>Indicates whether any changes have been registered.</summary>
15
    public bool IsEmpty => _added.Count == 0 && _removed.Count == 0;
714✔
16

17
    /// <summary>Entities that were not in the original value and are now present</summary>
18
    public IReadOnlySet<object> Added => _added;
306✔
19

20
    /// <summary>Entities that were in the original value and are now absent</summary>
21
    public IReadOnlySet<object> Removed => _removed;
306✔
22

23
    public void RegisterAdded(object relatedEntity)
24
    {
25
        if (_removed.Contains(relatedEntity))
634✔
26
            _removed.Remove(relatedEntity);
4✔
27
        else
28
            _added.Add(relatedEntity);
630✔
29
    }
30

31
    public void RegisterRemoved(object relatedEntity)
32
    {
33
        if (_added.Contains(relatedEntity))
80✔
NEW
34
            _added.Remove(relatedEntity);
×
35
        else
36
            _removed.Add(relatedEntity);
80✔
37
    }
38
}
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