This commit is contained in:
Matt Parker
2025-08-13 22:41:36 +10:00
parent 3ef1705451
commit 1c811b4d10

View File

@@ -36,9 +36,6 @@ public static class RoslynAnalysis
foreach (var project in solution.Projects) foreach (var project in solution.Projects)
{ {
//Console.WriteLine($"Project: {project.Name}"); //Console.WriteLine($"Project: {project.Name}");
foreach (var document in project.Documents)
{
Console.WriteLine($"Document: {document.Name}");
var compilation = await project.GetCompilationAsync(); var compilation = await project.GetCompilationAsync();
Guard.Against.Null(compilation, nameof(compilation)); Guard.Against.Null(compilation, nameof(compilation));
@@ -51,6 +48,8 @@ public static class RoslynAnalysis
Console.WriteLine(diagnostic); Console.WriteLine(diagnostic);
// Optionally run CodeFixProviders here // Optionally run CodeFixProviders here
} }
foreach (var document in project.Documents)
{
// var syntaxTree = await document.GetSyntaxTreeAsync(); // var syntaxTree = await document.GetSyntaxTreeAsync();
// var root = await syntaxTree!.GetRootAsync(); // var root = await syntaxTree!.GetRootAsync();
// var classifiedSpans = await Classifier.GetClassifiedSpansAsync(document, root.FullSpan); // var classifiedSpans = await Classifier.GetClassifiedSpansAsync(document, root.FullSpan);
@@ -62,6 +61,5 @@ public static class RoslynAnalysis
// } // }
} }
} }
} }
} }