Model: Cache instances of CustomAttributeData

This commit is contained in:
Katy Coe
2019-11-16 23:31:59 +01:00
parent 80d168a2de
commit d97a36d8f7
2 changed files with 15 additions and 3 deletions

View File

@@ -31,6 +31,9 @@ namespace Il2CppInspector.Reflection
// List of all methods ordered by their MethodDefinitionIndex
public MethodBase[] MethodsByDefinitionIndex { get; }
// List of all generated CustomAttributeData objects by their index into AttributeTypeIndices
public Dictionary<int, CustomAttributeData> AttributesByIndices { get; } = new Dictionary<int, CustomAttributeData>();
public Il2CppModel(Il2CppInspector package) {
Package = package;
TypesByDefinitionIndex = new TypeInfo[package.TypeDefinitions.Length];