public Il2CppGenericContext GetMethodSpecGenericContext(Il2CppMethodSpec methodSpec) { var classInstPointer = 0ul; var methodInstPointer = 0ul; if (methodSpec.classIndexIndex != -1) { classInstPointer = il2Cpp.genericInstPointers[methodSpec.classIndexIndex]; } if (methodSpec.methodIndexIndex != -1) { methodInstPointer = il2Cpp.genericInstPointers[methodSpec.methodIndexIndex]; } return(new Il2CppGenericContext { class_inst = classInstPointer, method_inst = methodInstPointer }); }
public (string, string) GetMethodSpecName(Il2CppMethodSpec methodSpec, bool addNamespace = false) { var methodDef = metadata.methodDefs[methodSpec.methodDefinitionIndex]; var typeDef = metadata.typeDefs[methodDef.declaringType]; var typeName = GetTypeDefName(typeDef, addNamespace, false); if (methodSpec.classIndexIndex != -1) { var classInst = il2Cpp.genericInsts[methodSpec.classIndexIndex]; typeName += GetGenericInstParams(classInst); } var methodName = metadata.GetStringFromIndex(methodDef.nameIndex); if (methodSpec.methodIndexIndex != -1) { var methodInst = il2Cpp.genericInsts[methodSpec.methodIndexIndex]; methodName += GetGenericInstParams(methodInst); } return(typeName, methodName); }
public string GetMethodSpecMethodName(Il2CppMethodSpec methodSpec) { var methodDef = metadata.methodDefs[methodSpec.methodDefinitionIndex]; var typeDef = metadata.typeDefs[methodDef.declaringType]; var typeName = GetTypeDefName(typeDef, false, false); if (methodSpec.classIndexIndex != -1) { var classInst = il2Cpp.genericInsts[methodSpec.classIndexIndex]; typeName += GetGenericInstParams(classInst); } var methodName = typeName + "." + metadata.GetStringFromIndex(methodDef.nameIndex); if (methodSpec.methodIndexIndex != -1) { var methodInst = il2Cpp.genericInsts[methodSpec.methodIndexIndex]; methodName += GetGenericInstParams(methodInst); } return(methodName); }