rearrange

This commit is contained in:
Matthew Parker [SSW]
2025-01-11 13:46:37 +10:00
parent 822e9e28ae
commit 52e1f33193
7 changed files with 39 additions and 19 deletions

View File

@@ -0,0 +1,11 @@
using Microsoft.CodeAnalysis.MSBuild;
namespace SharpIDE.Application.Features.SolutionDiscovery;
public class Progress : IProgress<ProjectLoadProgress>
{
public void Report(ProjectLoadProgress value)
{
Console.WriteLine($"{value.Operation} completed for {value.FilePath} ({value.TargetFramework}) in {value.ElapsedTime.TotalMilliseconds}ms");
}
}

View File

@@ -9,11 +9,9 @@ public static class RoslynTest
{
public static async Task Analyse(string solutionFilePath)
{
var workspace = MSBuildWorkspace.Create();
var timer = Stopwatch.StartNew();
var solution = await workspace.OpenSolutionAsync(solutionFilePath);
var solution = await workspace.OpenSolutionAsync(solutionFilePath, new Progress());
timer.Stop();
Console.WriteLine($"Solution loaded in {timer.ElapsedMilliseconds}ms");
Console.WriteLine();