summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/TemporaryHacks
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-06-16 22:14:44 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-06-16 22:14:44 -0400
commit8e9237bdd7ec179975c9be5e28c811b42007e707 (patch)
tree665ca44f40e77e8f4a3af55ee442e2b3acba6434 /src/SMAPI/Framework/TemporaryHacks
parente10147e7bda94a8fbc58684246628a6520d2c6b8 (diff)
parent011aa4c9d07d6fc313d6d1ee107651778bb3c665 (diff)
downloadSMAPI-8e9237bdd7ec179975c9be5e28c811b42007e707.tar.gz
SMAPI-8e9237bdd7ec179975c9be5e28c811b42007e707.tar.bz2
SMAPI-8e9237bdd7ec179975c9be5e28c811b42007e707.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/Framework/TemporaryHacks')
-rw-r--r--src/SMAPI/Framework/TemporaryHacks/MiniMonoModHotfix.cs25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/SMAPI/Framework/TemporaryHacks/MiniMonoModHotfix.cs b/src/SMAPI/Framework/TemporaryHacks/MiniMonoModHotfix.cs
index b5fc1f57..1fcda077 100644
--- a/src/SMAPI/Framework/TemporaryHacks/MiniMonoModHotfix.cs
+++ b/src/SMAPI/Framework/TemporaryHacks/MiniMonoModHotfix.cs
@@ -27,15 +27,6 @@ namespace MonoMod.Utils
private static readonly object[] _NoArgs = Array.Empty<object>();
private static readonly object?[] _CacheGetterArgs = { /* MemberListType.All */ 0, /* name apparently always null? */ null };
- private static readonly Type? t_RuntimeModule =
- typeof(Module).Assembly
- .GetType("System.Reflection.RuntimeModule");
-
- private static readonly PropertyInfo? p_RuntimeModule_RuntimeType =
- typeof(Module).Assembly
- .GetType("System.Reflection.RuntimeModule")
- ?.GetProperty("RuntimeType", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
-
private static readonly Type? t_RuntimeType =
typeof(Type).Assembly
.GetType("System.RuntimeType");
@@ -109,22 +100,6 @@ namespace MonoMod.Utils
}
}
- public static Type? GetModuleType(this Module? module)
- {
- // Sadly we can't blindly resolve type 0x02000001 as the runtime throws ArgumentException.
-
- if (module == null || t_RuntimeModule == null || !t_RuntimeModule.IsInstanceOfType(module))
- return null;
-
- // .NET
- if (p_RuntimeModule_RuntimeType != null)
- return (Type?)p_RuntimeModule_RuntimeType.GetValue(module, _NoArgs);
-
- // The hotfix doesn't apply to Mono anyway, thus that's not copied over.
-
- return null;
- }
-
public static Type? GetRealDeclaringType(this MemberInfo member)
{
return member.DeclaringType ?? member.Module.GetModuleType();