Add support for metadata version 29.2 and 31

This commit is contained in:
LukeFZ
2024-06-24 18:41:14 +02:00
parent 98edac1aea
commit 87766f6f96
7 changed files with 4871 additions and 10 deletions

View File

@@ -383,6 +383,15 @@ namespace Il2CppInspector.Outputs
mMethod.ParamDefs.Add(p);
}
if (method is MethodInfo { ReturnParameter: not null } methodInfo && methodInfo.ReturnParameter.MetadataToken != 0)
{
mMethod.Parameters.ReturnParameter.CreateParamDef();
var returnParam = mMethod.Parameters.ReturnParameter.ParamDef;
foreach (var ca in methodInfo.ReturnParameter.CustomAttributes)
AddCustomAttribute(module, returnParam, ca);
}
// Everything that's not extern, abstract or a delegate type should have a method body
if ((method.Attributes & System.Reflection.MethodAttributes.PinvokeImpl) == 0
&& method.DeclaringType.BaseType?.FullName != "System.MulticastDelegate"