You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It happen when the developer call DynamicILInfo.GetTokenFor(RuntimeFieldHandle field) rather than DynamicILInfo.GetTokenFor(RuntimeFieldHandle field, RuntimeTypeHandle contextType) to build DynamicMethod, .NET doesn't crash without declaring type, it can work fine also.
Especially, .NET2.0 doesn't support a public overload with RuntimeTypeHandle parameter, that's why so many protectors don't pass in this parameter.
As the reason is clear, such name/comment could be updated if necessary.
It happen when the developer call
DynamicILInfo.GetTokenFor(RuntimeFieldHandle field)
rather thanDynamicILInfo.GetTokenFor(RuntimeFieldHandle field, RuntimeTypeHandle contextType)
to build DynamicMethod, .NET doesn't crash without declaring type, it can work fine also.Especially, .NET2.0 doesn't support a public overload with RuntimeTypeHandle parameter, that's why so many protectors don't pass in this parameter.
As the reason is clear, such name/comment could be updated if necessary.
dnlib/src/DotNet/Emit/DynamicMethodBodyReader.cs
Lines 16 to 28 in 0b2dc95
dnlib/src/DotNet/Emit/DynamicMethodBodyReader.cs
Lines 458 to 462 in 0b2dc95
dnlib/src/DotNet/Emit/DynamicMethodBodyReader.cs
Lines 458 to 462 in 0b2dc95
The text was updated successfully, but these errors were encountered: