Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated to IL Spy 7.0.0.6372 #2113

Merged
merged 2 commits into from
Mar 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<PackageReference Update="Dotnet.Script.DependencyModel" Version="1.0.2" />
<PackageReference Update="Dotnet.Script.DependencyModel.NuGet" Version="1.0.1" />
<PackageReference Update="ICSharpCode.Decompiler" Version="6.1.0.5902" />
<PackageReference Update="ICSharpCode.Decompiler" Version="7.0.0.6372-preview3" />
<PackageReference Update="McMaster.Extensions.CommandLineUtils" Version="2.2.4" />

<PackageReference Update="Microsoft.AspNetCore.Diagnostics" Version="$(AspNetCorePackageVersion)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using System.IO;
using Microsoft.CodeAnalysis;
using Microsoft.Extensions.Logging;
using System.Threading.Tasks;

namespace OmniSharp.Roslyn.CSharp.Services.Decompilation
{
Expand Down Expand Up @@ -126,6 +127,16 @@ public PEFile ResolveModule(PEFile mainModule, string moduleName)
return new PEFile(moduleFileName, PEStreamOptions.PrefetchMetadata);
}

public Task<PEFile> ResolveAsync(IAssemblyReference name)
{
return Task.Run(() => Resolve(name));
}

public Task<PEFile> ResolveModuleAsync(PEFile mainModule, string moduleName)
{
return Task.Run(() => ResolveModule(mainModule, moduleName));
}

private void Log(string format, params object[] args)
=> _logger.LogTrace(format, args);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/OmniSharp.Roslyn.CSharp.Tests/GoToDefinitionFacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ public void Baz() {
// second comment should indicate we have decompiled
var comments = compilationUnit.DescendantTrivia().Where(t => t.Kind() == SyntaxKind.SingleLineCommentTrivia).ToArray();
Assert.NotNull(comments);
Assert.Equal("// Decompiled with ICSharpCode.Decompiler 6.1.0.5902", comments[1].ToString());
Assert.Equal("// Decompiled with ICSharpCode.Decompiler 7.0.0.6372", comments[1].ToString());

// contrary to regular metadata, we should have methods with full bodies
// this condition would fail if decompilation wouldn't work
Expand Down