Model: Include TypesByMethodSpecClassIndex in Model.Types

This commit is contained in:
Katy Coe
2020-02-02 04:54:24 +01:00
parent 759a77031e
commit 63fb345bb1
2 changed files with 4 additions and 3 deletions

View File

@@ -63,7 +63,7 @@ def SetName(addr, name):
}
private void writeMethods() {
foreach (var type in model.Types.Where(t => t != null)) {
foreach (var type in model.Types) {
writeMethods(type.Name, type.DeclaredConstructors);
writeMethods(type.Name, type.DeclaredMethods);
}

View File

@@ -36,8 +36,9 @@ namespace Il2CppInspector.Reflection
public ConcurrentDictionary<ulong, TypeInfo> TypesByVirtualAddress { get; } = new ConcurrentDictionary<ulong, TypeInfo>();
// Every type
public IEnumerable<TypeInfo> Types => new IEnumerable<TypeInfo>[] {TypesByDefinitionIndex, TypesByReferenceIndex, TypesByVirtualAddress.Values}
.SelectMany(t => t).Where(t => t != null).Distinct();
public IEnumerable<TypeInfo> Types => new IEnumerable<TypeInfo>[]
{TypesByDefinitionIndex, TypesByReferenceIndex, TypesByMethodSpecClassIndex.Values, TypesByVirtualAddress.Values}
.SelectMany(t => t).Distinct();
// List of all methods ordered by their MethodDefinitionIndex
public MethodBase[] MethodsByDefinitionIndex { get; }