private static void AddSolution(SolutionSizeTracker.IncrementalAnalyzer analyzer, Solution solution) { foreach (var document in solution.Projects.SelectMany(p => p.Documents)) { analyzer.AnalyzeSyntaxAsync(document, CancellationToken.None).Wait(); } }
private static async Task AddSolutionAsync(SolutionSizeTracker.IncrementalAnalyzer analyzer, Solution solution) { foreach (var document in solution.Projects.SelectMany(p => p.Documents)) { await analyzer.AnalyzeSyntaxAsync(document, InvocationReasons.Empty, CancellationToken.None); } }