Add --suppress-metadata option

This commit is contained in:
Katy Coe
2019-11-13 15:55:18 +01:00
parent 69551c7f39
commit 7c64e0a09c
7 changed files with 59 additions and 37 deletions

View File

@@ -48,6 +48,9 @@ namespace Il2CppInspector
[Option('g', "no-suppress-cg", Required = false, HelpText = "Don't suppress generation of C# code for items with CompilerGenerated attribute", Default = false)]
public bool DontSuppressCompilerGenerated { get; set; }
[Option('n', "suppress-metadata", Required = false, HelpText = "Suppress method pointers, field offsets and type indices from C# output. Useful for comparing two versions of a binary for changes with a diff tool", Default = false)]
public bool SuppressMetadata { get; set; }
}
public static int Main(string[] args) =>
@@ -84,7 +87,8 @@ namespace Il2CppInspector
// C# signatures output
var writer = new Il2CppCSharpDumper(model) {
ExcludedNamespaces = options.ExcludedNamespaces.ToList(),
SuppressGenerated = !options.DontSuppressCompilerGenerated
SuppressGenerated = !options.DontSuppressCompilerGenerated,
SuppressMetadata = options.SuppressMetadata
};
var imageSuffix = i++ > 0 ? "-" + (i - 1) : "";