| Name | Message | Date |
|---|---|---|
| 📄 Poc.csproj | 18 hours ago | |
| 📄 Program.cs | 18 hours ago |
📄
Program.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
using System; using System.IO; using System.Runtime.CompilerServices; using Microsoft.Build.Locator; using Microsoft.CodeAnalysis.MSBuild; using Reacher; MSBuildLocator.RegisterDefaults(); using var workspace = MSBuildWorkspace.Create(); var solution = await workspace.OpenSolutionAsync(GetSolutionPath()); Noop(); var analysis = await solution.AnalyzeReachabilityFromEntryPoints(default); foreach (var member in analysis.ReachableMembers) { Console.WriteLine(member); } return; #pragma warning disable CS0162 // Intentionally unreachable Unreachable(); #pragma warning restore CS0162 static string GetSolutionPath([CallerFilePath] string sourcePath = null!) => Path.GetFullPath(Path.Join(Path.GetDirectoryName(sourcePath), @"..\Reacher.slnx")); static void Noop() => TransitiveNoop(); static void TransitiveNoop() { } static void Unreachable() => Unreachable(); static void Unused() => Unused();