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

lucaslorentz / auto-compute / 20848048253

09 Jan 2026 09:54AM UTC coverage: 80.79% (-0.04%) from 80.825%
20848048253

push

github

lucaslorentz
Publicly expose method to TopoSort computed members

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

1901 of 2353 relevant lines covered (80.79%)

887.2 hits per line

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

90.91
/src/LLL.AutoCompute.EFCore/Internal/EnumerableExtensions.cs
1

2
using LLL.AutoCompute.EFCore.Metadata.Internal;
3

4
namespace LLL.AutoCompute.EFCore;
5

6
public static class EnumerableExtensions
7
{
8
    public static IReadOnlyList<ComputedMember> TopoSort(this IEnumerable<ComputedMember> source)
9
    {
NEW
10
        return source.TopoSort(c => c.GetComputedDependencies());
×
11
    }
12

13
    internal static IReadOnlyList<T> TopoSort<T>(
14
        this IEnumerable<T> source,
15
        Func<T, IEnumerable<T>> getDependencies)
16
        where T : notnull
17
    {
18
        var visited = new HashSet<T>();
20✔
19
        var result = new List<T>();
20✔
20

21
        // Visit item, adding their dependencies first
22
        void Visit(T item)
23
        {
24
            if (!visited.Add(item))
238✔
25
                return;
82✔
26

27
            foreach (var v in getDependencies(item))
476✔
28
                Visit(v);
82✔
29

30
            result.Add(item);
156✔
31
        }
32

33
        foreach (var item in source)
352✔
34
            Visit(item);
156✔
35

36
        return result;
20✔
37
    }
38

39
}
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