From 67e858718b52ce491b6330a0ab99c8af7fec5661 Mon Sep 17 00:00:00 2001 From: Vitalii Mikhailov Date: Thu, 4 Apr 2024 13:52:56 +0300 Subject: [PATCH] Updated dependencies --- .../BUTR.CrashReport.Bannerlord.Parser.csproj | 4 ++-- .../BUTR.CrashReport.Decompilers.csproj | 8 ++++---- .../ILSpy/CSharpILMixedLanguage.cs | 8 ++++---- src/BUTR.CrashReport.Decompilers/ILSpy/CSharpLanguage.cs | 6 +++--- .../ILSpy/PlainTextOutput2.cs | 2 +- .../Utils/ReferenceImporter.cs | 4 ++-- .../BUTR.CrashReport.Models.csproj | 2 +- .../CapabilityModuleOrPluginModel.cs | 2 +- src/BUTR.CrashReport.Models/LoaderPluginModel.cs | 2 +- src/BUTR.CrashReport.Models/ModuleModel.cs | 2 +- src/BUTR.CrashReport/Extensions/ModuleModelExtensions.cs | 2 +- src/BUTR.CrashReport/Models/HarmonyPatches.cs | 6 +++--- src/BUTR.CrashReport/Utils/CrashReportUtils.cs | 6 +++--- 13 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/BUTR.CrashReport.Bannerlord.Parser/BUTR.CrashReport.Bannerlord.Parser.csproj b/src/BUTR.CrashReport.Bannerlord.Parser/BUTR.CrashReport.Bannerlord.Parser.csproj index 440ed6b..3d64d3b 100644 --- a/src/BUTR.CrashReport.Bannerlord.Parser/BUTR.CrashReport.Bannerlord.Parser.csproj +++ b/src/BUTR.CrashReport.Bannerlord.Parser/BUTR.CrashReport.Bannerlord.Parser.csproj @@ -32,8 +32,8 @@ - - + + diff --git a/src/BUTR.CrashReport.Decompilers/BUTR.CrashReport.Decompilers.csproj b/src/BUTR.CrashReport.Decompilers/BUTR.CrashReport.Decompilers.csproj index 2300dc8..3ac83c8 100644 --- a/src/BUTR.CrashReport.Decompilers/BUTR.CrashReport.Decompilers.csproj +++ b/src/BUTR.CrashReport.Decompilers/BUTR.CrashReport.Decompilers.csproj @@ -7,9 +7,9 @@ - - - + + + @@ -17,7 +17,7 @@ - + diff --git a/src/BUTR.CrashReport.Decompilers/ILSpy/CSharpILMixedLanguage.cs b/src/BUTR.CrashReport.Decompilers/ILSpy/CSharpILMixedLanguage.cs index 7d434b4..7081401 100644 --- a/src/BUTR.CrashReport.Decompilers/ILSpy/CSharpILMixedLanguage.cs +++ b/src/BUTR.CrashReport.Decompilers/ILSpy/CSharpILMixedLanguage.cs @@ -39,7 +39,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(null, false, module.DetectTargetFrameworkId(), module.DetectRuntimePack()); return new CSharpDecompiler(module, resolver, settings) { CancellationToken = ct }; @@ -72,7 +72,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 { @@ -114,7 +114,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 metadataFile, MethodDefinitionHandle methodHandle, ref BlobReader blob, int methodRva) { if (output is not PlainTextOutput2 plainTextOutput2) return; if (_stringBuilder is null || _stringBuilderLinesIndices is null) return; @@ -143,7 +143,7 @@ protected override void WriteInstruction(ITextOutput output, MetadataReader meta } } - base.WriteInstruction(plainTextOutput2, metadata, methodHandle, ref blob, methodRva); + base.WriteInstruction(plainTextOutput2, metadataFile, methodHandle, ref blob, methodRva); } } } \ No newline at end of file diff --git a/src/BUTR.CrashReport.Decompilers/ILSpy/CSharpLanguage.cs b/src/BUTR.CrashReport.Decompilers/ILSpy/CSharpLanguage.cs index 59b4d61..e8d6c99 100644 --- a/src/BUTR.CrashReport.Decompilers/ILSpy/CSharpLanguage.cs +++ b/src/BUTR.CrashReport.Decompilers/ILSpy/CSharpLanguage.cs @@ -19,7 +19,7 @@ internal class CSharpLanguage : Language { private const int _transformCount = int.MaxValue; - public static CSharpDecompiler CreateDecompiler(PEFile module, DecompilerSettings settings, CancellationToken ct) + public static CSharpDecompiler CreateDecompiler(MetadataFile module, DecompilerSettings settings, CancellationToken ct) { var resolver = new UniversalAssemblyResolver(null, false, module.DetectTargetFrameworkId(), module.DetectRuntimePack()); var decompiler = new CSharpDecompiler(module, resolver, settings) { CancellationToken = ct }; @@ -39,10 +39,10 @@ private static void WriteCode(ITextOutput output, DecompilerSettings settings, S public override void DecompileMethod(IMethod method, ITextOutput output, DecompilerSettings settings) { - if (method.ParentModule?.PEFile is null) + if (method.ParentModule?.MetadataFile is null) return; - var assembly = method.ParentModule.PEFile; + var assembly = method.ParentModule.MetadataFile; var decompiler = CreateDecompiler(assembly, settings, CancellationToken.None); WriteCommentLine(output, assembly.FullName); WriteCommentLine(output, TypeToString(method.DeclaringType, includeNamespace: true)); diff --git a/src/BUTR.CrashReport.Decompilers/ILSpy/PlainTextOutput2.cs b/src/BUTR.CrashReport.Decompilers/ILSpy/PlainTextOutput2.cs index 2e058ad..bea788d 100644 --- a/src/BUTR.CrashReport.Decompilers/ILSpy/PlainTextOutput2.cs +++ b/src/BUTR.CrashReport.Decompilers/ILSpy/PlainTextOutput2.cs @@ -107,7 +107,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); } diff --git a/src/BUTR.CrashReport.Decompilers/Utils/ReferenceImporter.cs b/src/BUTR.CrashReport.Decompilers/Utils/ReferenceImporter.cs index 54f3a85..1bb23a4 100644 --- a/src/BUTR.CrashReport.Decompilers/Utils/ReferenceImporter.cs +++ b/src/BUTR.CrashReport.Decompilers/Utils/ReferenceImporter.cs @@ -61,7 +61,7 @@ public static Dictionary GetImpor Trace.TraceError(e.ToString()); } } - + try { var assembly = AssemblyDefinition.FromFile(x.Value.Location); @@ -80,7 +80,7 @@ public static Dictionary GetImpor Trace.TraceError(x.Key.ToString()); Trace.TraceError(e.ToString()); } - + return Array.Empty(); }); } \ No newline at end of file diff --git a/src/BUTR.CrashReport.Models/BUTR.CrashReport.Models.csproj b/src/BUTR.CrashReport.Models/BUTR.CrashReport.Models.csproj index 71244d4..a69f096 100644 --- a/src/BUTR.CrashReport.Models/BUTR.CrashReport.Models.csproj +++ b/src/BUTR.CrashReport.Models/BUTR.CrashReport.Models.csproj @@ -19,7 +19,7 @@ - + diff --git a/src/BUTR.CrashReport.Models/CapabilityModuleOrPluginModel.cs b/src/BUTR.CrashReport.Models/CapabilityModuleOrPluginModel.cs index fd3c4fe..9692faf 100644 --- a/src/BUTR.CrashReport.Models/CapabilityModuleOrPluginModel.cs +++ b/src/BUTR.CrashReport.Models/CapabilityModuleOrPluginModel.cs @@ -9,7 +9,7 @@ public record CapabilityModuleOrPluginModel /// The name of the capability. /// public string Name { get; } - + /// /// An optional description of the capability. /// diff --git a/src/BUTR.CrashReport.Models/LoaderPluginModel.cs b/src/BUTR.CrashReport.Models/LoaderPluginModel.cs index b9d127f..eea54a3 100644 --- a/src/BUTR.CrashReport.Models/LoaderPluginModel.cs +++ b/src/BUTR.CrashReport.Models/LoaderPluginModel.cs @@ -36,7 +36,7 @@ public sealed record LoaderPluginModel /// The capabilities, if there are any. /// public required IList Capabilities { get; set; } = new List(); - + /// /// /// diff --git a/src/BUTR.CrashReport.Models/ModuleModel.cs b/src/BUTR.CrashReport.Models/ModuleModel.cs index 36411f6..83f2e51 100644 --- a/src/BUTR.CrashReport.Models/ModuleModel.cs +++ b/src/BUTR.CrashReport.Models/ModuleModel.cs @@ -61,7 +61,7 @@ public sealed record ModuleModel /// The submodules of the module, if there are any. /// public required IList SubModules { get; set; } = new List(); - + /// /// The capabilities, if there are any. /// diff --git a/src/BUTR.CrashReport/Extensions/ModuleModelExtensions.cs b/src/BUTR.CrashReport/Extensions/ModuleModelExtensions.cs index d53aaa6..476c935 100644 --- a/src/BUTR.CrashReport/Extensions/ModuleModelExtensions.cs +++ b/src/BUTR.CrashReport/Extensions/ModuleModelExtensions.cs @@ -30,7 +30,7 @@ public static bool ContainsAssemblyReferences(this ModuleModel model, IEnumerabl public static bool ContainsTypeReferences(this ModuleModel model, IEnumerable assemblies, string[] typeReferences) => assemblies.Where(x => x.ModuleId == model.Id) .SelectMany(x => x.ImportedTypeReferences) .Any(x => typeReferences.Any(y => FileSystemName.MatchesSimpleExpression(y, x.FullName))); - + /// /// Gets whether the module contains an assembly reference. /// diff --git a/src/BUTR.CrashReport/Models/HarmonyPatches.cs b/src/BUTR.CrashReport/Models/HarmonyPatches.cs index ff1bbb9..08142ab 100644 --- a/src/BUTR.CrashReport/Models/HarmonyPatches.cs +++ b/src/BUTR.CrashReport/Models/HarmonyPatches.cs @@ -11,17 +11,17 @@ public record HarmonyPatches /// /// public required IList Prefixes { get; set; } - + /// /// /// public required IList Postfixes { get; set; } - + /// /// /// public required IList Finalizers { get; set; } - + /// /// /// diff --git a/src/BUTR.CrashReport/Utils/CrashReportUtils.cs b/src/BUTR.CrashReport/Utils/CrashReportUtils.cs index 5fa0bd5..662325b 100644 --- a/src/BUTR.CrashReport/Utils/CrashReportUtils.cs +++ b/src/BUTR.CrashReport/Utils/CrashReportUtils.cs @@ -30,17 +30,17 @@ public record StackframePatchData /// /// public required MethodBase? Original { get; set; } - + /// /// /// public required MethodInfo? Replacement { get; set; } - + /// /// /// public required List Patches { get; set; } - + /// /// ///