DLL: Allow suppression of metadata attributes

This commit is contained in:
Katy Coe
2021-01-12 02:17:23 +01:00
parent 59c095f794
commit fca91ff556
4 changed files with 27 additions and 6 deletions

View File

@@ -350,7 +350,8 @@
<!-- Assembly shim DLLs -->
<RadioButton GroupName="grpOutputType" Name="rdoOutputDll" VerticalContentAlignment="Center" FontSize="18" Foreground="{StaticResource MicrosoftGreen}">.NET assembly shim DLLs</RadioButton>
<TextBlock TextWrapping="WrapWithOverflow">No configuration required for assembly shims</TextBlock>
<CheckBox Name="cbSuppressDllMetadata" Margin="2,10,2,2">Suppress output of all metadata attributes</CheckBox>
<Separator Margin="5,15,5,15"/>

View File

@@ -612,11 +612,15 @@ namespace Il2CppInspectorGUI
return;
var dllOutPath = dllSaveFolderDialog.SelectedPath;
var suppressMetadata = cbSuppressDllMetadata.IsChecked == true;
areaBusyIndicator.Visibility = Visibility.Visible;
await Task.Run(() => {
OnStatusUpdate(this, "Generating .NET assembly shim DLLs");
new AssemblyShims(model.TypeModel).Write(dllOutPath, OnStatusUpdate);
new AssemblyShims(model.TypeModel) {
SuppressMetadata = suppressMetadata
}
.Write(dllOutPath, OnStatusUpdate);
});
break;
}