Model: Implement MetadataToken property

This commit is contained in:
Katy Coe
2021-01-10 08:37:49 +01:00
parent 8ffff24079
commit cd7ddf193a
11 changed files with 32 additions and 16 deletions

View File

@@ -27,6 +27,9 @@ namespace Il2CppInspector.Reflection {
// Display name of the assembly
public string ShortName { get; }
// Metadata token of the assembly
public int MetadataToken { get; }
// Entry point method for the assembly
public MethodInfo EntryPoint => throw new NotImplementedException();
@@ -45,6 +48,7 @@ namespace Il2CppInspector.Reflection {
if (AssemblyDefinition.imageIndex != imageIndex)
throw new InvalidOperationException("Assembly/image index mismatch");
MetadataToken = (int) AssemblyDefinition.token;
Index = ImageDefinition.assemblyIndex;
ShortName = Model.Package.Strings[ImageDefinition.nameIndex];