• 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

72.73
/src/LLL.AutoCompute/ObservedEntityTypeChange.cs
1
namespace LLL.AutoCompute;
2

3
/// <summary>
4
/// Represents changes that happened to an entity type.
5
/// </summary>
6
public class ObservedEntityTypeChange
7
{
8
    private readonly HashSet<object> _added = [];
512✔
9
    private readonly HashSet<object> _removed = [];
512✔
10

11
    /// <summary>Indicates whether any changes have been registered.</summary>
NEW
12
    public bool IsEmpty => _added.Count == 0 && _removed.Count == 0;
×
13

14
    /// <summary>Entities that were added.</summary>
15
    public IReadOnlySet<object> Added => _added;
13,252✔
16

17
    /// <summary>Entities that were removed.</summary>
18
    public IReadOnlySet<object> Removed => _removed;
3,892✔
19

20
    /// <summary>
21
    /// Registers that an entity was added.
22
    /// </summary>
23
    /// <param name="relatedEntity"></param>
24
    public void RegisterAdded(object relatedEntity)
25
    {
26
        if (_removed.Contains(relatedEntity))
732✔
NEW
27
            _removed.Remove(relatedEntity);
×
28
        else
29
            _added.Add(relatedEntity);
732✔
30
    }
31

32
    /// <summary>
33
    /// Registers that an entity was removed.
34
    /// </summary>
35
    /// <param name="relatedEntity"></param>
36
    public void RegisterRemoved(object relatedEntity)
37
    {
38
        if (_added.Contains(relatedEntity))
6✔
NEW
39
            _added.Remove(relatedEntity);
×
40
        else
41
            _removed.Add(relatedEntity);
6✔
42
    }
43
}
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

© 2025 Coveralls, Inc