Add generics support to TypeInfo.GetVTable

This patch fixes TypeInfo.GetVTable so that it specializes the vtable
for generic type instances. Also fix a minor bug in PropertyInfo that
would pass null pointers to GetMethodByDefinition.
This commit is contained in:
Robert Xiao
2020-04-20 00:11:31 -07:00
committed by Katy
parent 359b99fded
commit 4ba48b9c75
3 changed files with 29 additions and 12 deletions

View File

@@ -76,6 +76,7 @@ namespace Il2CppInspector.Reflection
return this;
throw new InvalidOperationException("This method can only be called on generic methods");
}
public MethodBase RootDefinition => rootDefinition;
// See: https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodbase.isgenericmethod?view=netframework-4.8
public bool IsGenericMethod { get; }