From 464797c380bae8365c7e0f6c572604d9a7777a19 Mon Sep 17 00:00:00 2001 From: filipw Date: Wed, 3 Mar 2021 11:23:12 +0100 Subject: [PATCH] updated to IL Spy 7.0.0.6372 --- build/Packages.props | 2 +- .../Services/Decompilation/AssemblyResolver.cs | 11 +++++++++++ .../GoToDefinitionFacts.cs | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/build/Packages.props b/build/Packages.props index d722bea100..1763397560 100644 --- a/build/Packages.props +++ b/build/Packages.props @@ -15,7 +15,7 @@ - + diff --git a/src/OmniSharp.Roslyn.CSharp/Services/Decompilation/AssemblyResolver.cs b/src/OmniSharp.Roslyn.CSharp/Services/Decompilation/AssemblyResolver.cs index c5c60498a0..ba4a6bb280 100644 --- a/src/OmniSharp.Roslyn.CSharp/Services/Decompilation/AssemblyResolver.cs +++ b/src/OmniSharp.Roslyn.CSharp/Services/Decompilation/AssemblyResolver.cs @@ -9,6 +9,7 @@ using System.IO; using Microsoft.CodeAnalysis; using Microsoft.Extensions.Logging; +using System.Threading.Tasks; namespace OmniSharp.Roslyn.CSharp.Services.Decompilation { @@ -126,6 +127,16 @@ public PEFile ResolveModule(PEFile mainModule, string moduleName) return new PEFile(moduleFileName, PEStreamOptions.PrefetchMetadata); } + public Task ResolveAsync(IAssemblyReference name) + { + return Task.Run(() => Resolve(name)); + } + + public Task ResolveModuleAsync(PEFile mainModule, string moduleName) + { + return Task.Run(() => ResolveModule(mainModule, moduleName)); + } + private void Log(string format, params object[] args) => _logger.LogTrace(format, args); } diff --git a/tests/OmniSharp.Roslyn.CSharp.Tests/GoToDefinitionFacts.cs b/tests/OmniSharp.Roslyn.CSharp.Tests/GoToDefinitionFacts.cs index 307e3c0745..9dc2c38c98 100644 --- a/tests/OmniSharp.Roslyn.CSharp.Tests/GoToDefinitionFacts.cs +++ b/tests/OmniSharp.Roslyn.CSharp.Tests/GoToDefinitionFacts.cs @@ -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