rearrange
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user