From 3301b85ed5e7dda6a270143604b3df16572f0d65 Mon Sep 17 00:00:00 2001 From: Maik Macho Date: Mon, 3 Feb 2020 01:00:42 +0100 Subject: [PATCH] Update MonoMod.Common, set DynamicMethodDefinition.OwnerType --- Harmony/Harmony.csproj | 2 +- Harmony/Internal/MethodPatcher.cs | 5 ++++- HarmonyTests/HarmonyTests.csproj | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Harmony/Harmony.csproj b/Harmony/Harmony.csproj index 8ba80c29..fee36dd7 100644 --- a/Harmony/Harmony.csproj +++ b/Harmony/Harmony.csproj @@ -96,7 +96,7 @@ - + diff --git a/Harmony/Internal/MethodPatcher.cs b/Harmony/Internal/MethodPatcher.cs index 46acafe5..c66b1f1d 100644 --- a/Harmony/Internal/MethodPatcher.cs +++ b/Harmony/Internal/MethodPatcher.cs @@ -236,7 +236,10 @@ internal static DynamicMethodDefinition CreateDynamicMethod(MethodBase original, patchName, returnType, parameterTypes.ToArray() - ); + ) + { + OwnerType = original.DeclaringType + }; #if NETSTANDARD2_0 || NETCOREAPP2_0 #else diff --git a/HarmonyTests/HarmonyTests.csproj b/HarmonyTests/HarmonyTests.csproj index 5fe7e64b..b9c59a13 100644 --- a/HarmonyTests/HarmonyTests.csproj +++ b/HarmonyTests/HarmonyTests.csproj @@ -61,7 +61,7 @@ - +