From 8e362c11e491085c376d11e64008e416dca26ade Mon Sep 17 00:00:00 2001 From: Vitalii Mikhailov Date: Sat, 6 Apr 2024 14:54:22 +0300 Subject: [PATCH] Update --- .../BUTR.Site.NexusMods.Client.csproj | 7 +++-- .../BUTR.Site.NexusMods.Server.csproj | 28 +++++++++---------- .../Utils/Reflection/CSharpILMixedLanguage.cs | 6 ++-- .../Utils/Reflection/PlainTextOutput2.cs | 2 +- 4 files changed, 22 insertions(+), 21 deletions(-) diff --git a/src/BUTR.Site.NexusMods.Client/BUTR.Site.NexusMods.Client.csproj b/src/BUTR.Site.NexusMods.Client/BUTR.Site.NexusMods.Client.csproj index c4e8fcc9..a282bad1 100644 --- a/src/BUTR.Site.NexusMods.Client/BUTR.Site.NexusMods.Client.csproj +++ b/src/BUTR.Site.NexusMods.Client/BUTR.Site.NexusMods.Client.csproj @@ -26,15 +26,16 @@ - - - + + + + diff --git a/src/BUTR.Site.NexusMods.Server/BUTR.Site.NexusMods.Server.csproj b/src/BUTR.Site.NexusMods.Server/BUTR.Site.NexusMods.Server.csproj index afc58cd3..0dcdcf4b 100644 --- a/src/BUTR.Site.NexusMods.Server/BUTR.Site.NexusMods.Server.csproj +++ b/src/BUTR.Site.NexusMods.Server/BUTR.Site.NexusMods.Server.csproj @@ -19,11 +19,11 @@ - - + + - - + + @@ -36,16 +36,16 @@ - - - - - - - - - - + + + + + + + + + + diff --git a/src/BUTR.Site.NexusMods.Server/Utils/Reflection/CSharpILMixedLanguage.cs b/src/BUTR.Site.NexusMods.Server/Utils/Reflection/CSharpILMixedLanguage.cs index 3186b9c5..246831e6 100644 --- a/src/BUTR.Site.NexusMods.Server/Utils/Reflection/CSharpILMixedLanguage.cs +++ b/src/BUTR.Site.NexusMods.Server/Utils/Reflection/CSharpILMixedLanguage.cs @@ -42,7 +42,7 @@ public static ReflectionDisassembler CreateDisassembler(ITextOutput output, Canc }; } - private static CSharpDecompiler CreateDecompiler(PEFile module, DecompilerSettings settings, CancellationToken ct) + private static CSharpDecompiler CreateDecompiler(MetadataFile module, DecompilerSettings settings, CancellationToken ct) { var resolver = new UniversalAssemblyResolver(module.Name, false, module.DetectTargetFrameworkId(), module.DetectRuntimePack(), PEStreamOptions.Default, MetadataReaderOptions.None); return new CSharpDecompiler(module, resolver, settings) { CancellationToken = ct }; @@ -75,7 +75,7 @@ public MixedMethodBodyDisassembler(ITextOutput output, CancellationToken ct) : b _cancellationToken = ct; } - public override void Disassemble(PEFile module, MethodDefinitionHandle handle) + public override void Disassemble(MetadataFile module, MethodDefinitionHandle handle) { try { @@ -117,7 +117,7 @@ private void IndexStringBuilder() } // Is called within base.Disassemble - protected override void WriteInstruction(ITextOutput output, MetadataReader metadata, MethodDefinitionHandle methodHandle, ref BlobReader blob, int methodRva) + protected override void WriteInstruction(ITextOutput output, MetadataFile metadata, MethodDefinitionHandle methodHandle, ref BlobReader blob, int methodRva) { if (output is not PlainTextOutput2 plainTextOutput2) return; if (_stringBuilder is null || _stringBuilderLinesIndices is null) return; diff --git a/src/BUTR.Site.NexusMods.Server/Utils/Reflection/PlainTextOutput2.cs b/src/BUTR.Site.NexusMods.Server/Utils/Reflection/PlainTextOutput2.cs index 49810b33..fc7e2fd0 100644 --- a/src/BUTR.Site.NexusMods.Server/Utils/Reflection/PlainTextOutput2.cs +++ b/src/BUTR.Site.NexusMods.Server/Utils/Reflection/PlainTextOutput2.cs @@ -109,7 +109,7 @@ public void WriteReference(OpCodeInfo opCode, bool omitSuffix = false) } } - public void WriteReference(PEFile module, Handle handle, string text, string protocol = "decompile", bool isDefinition = false) + public void WriteReference(MetadataFile module, Handle handle, string text, string protocol = "decompile", bool isDefinition = false) { Write(text); }