JSON: Write all exports in metadata file

This commit is contained in:
Katy Coe
2020-08-08 21:39:40 +02:00
parent 148aca34cf
commit c97bd7054e

View File

@@ -38,6 +38,7 @@ namespace Il2CppInspector.Outputs
writeUsages();
writeFunctions();
writeMetadata();
writeExports();
},
"Address map of methods, internal functions, type pointers and string literals in the binary file"
);
@@ -174,6 +175,16 @@ namespace Il2CppInspector.Outputs
}, "IL2CPP Function Metadata");
}
private void writeExports() {
var exports = model.Package.Binary.GetAPIExports();
writeArray("exports", () => {
foreach (var export in exports) {
writeObject(() => writeName(export.Value, export.Key));
}
}, "Exports");
}
private void writeObject(Action objectWriter) => writeObject(null, objectWriter);
private void writeObject(string name, Action objectWriter, string description = null) {