📄
Core/ReachabilityAnalysis.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using System.Collections.Generic; using Microsoft.CodeAnalysis; namespace Reacher; /// <summary> /// The results of a reachability analysis. /// </summary> /// <param name="ReachableMembers">The members the analysis deemed reachable from the original starting members.</param> /// <param name="UnreachableMembers"> /// The members the analysis deemed unreachable from the original starting members. /// </param> public sealed record ReachabilityAnalysis( IReadOnlyCollection<ReachableMember> ReachableMembers, IReadOnlyCollection<ISymbol> UnreachableMembers ); /// <summary> /// Describes a reachable member. /// </summary> /// <param name="Member">The reachable member.</param> /// <param name="ReachabilityConfidence">The confidence for this member being reachable.</param> public sealed record ReachableMember(ISymbol Member, ReachabilityConfidence ReachabilityConfidence); /// <summary> /// The confidence level of reachability. /// </summary> /// <remarks> /// The backing values of the enum values are considered private and might change without notice. /// </remarks> public enum ReachabilityConfidence { /// <summary> /// The confidence is absolute. /// </summary> DefinitelyReachable = 2, /// <summary> /// The reachability is probable, but cannot be proven. /// </summary> ProbablyReachable = 1, }