Model: Add AppModel.GetAddressMap() with cache

This commit is contained in:
Katy Coe
2020-08-11 07:36:53 +02:00
parent f750000c90
commit ef853b6fd2

View File

@@ -274,5 +274,14 @@ namespace Il2CppInspector.Model
// Get all the composite methods for a group
public IEnumerable<AppMethod> GetMethodGroup(string groupName) => Methods.Values.Where(m => m.Group == groupName);
// Get the address map for the model
// This takes a while to construct so we only build it if requested
private AddressMap addressMap;
public AddressMap GetAddressMap() {
if (addressMap == null)
addressMap = new AddressMap(this);
return addressMap;
}
}
}