Describe the bug
When a method is resolved inside the GlobalType (this is only possible via Module.ResolveMethod(int MDToken)) its DeclaringType property is null and when an attempt is made to patch the method, a NRE will get thrown in this function: GeneralExtensions.FullDescription(this MethodBase method)
To Reproduce
- Resolve a method via its metadata token that is inside
<Module> (or also known as the globaltype)
- Try to apply any patch to it
Expected behavior
The patch gets applied
Screenshot

Runtime environment:
- OS: Windows 10, 64bit
- .NET version 4.8
- Harmony version 1.2.0.1
Describe the bug
When a method is resolved inside the GlobalType (this is only possible via
Module.ResolveMethod(int MDToken)) itsDeclaringTypeproperty isnulland when an attempt is made to patch the method, a NRE will get thrown in this function: GeneralExtensions.FullDescription(this MethodBase method)To Reproduce
<Module>(or also known as the globaltype)Expected behavior
The patch gets applied
Screenshot

Runtime environment: