configuration file
<?xml version='1.0'?>
<Obfuscator>
<Var name="InPath" value="." />
<Var name="OutPath" value=".Obfuscator_Output" />
<Var name="KeyFile" value=".test.snk" />
<Var name="ReuseNames" value="true" />
<Var name="RenameProperties" value="true" />
<Var name="RenameEvents" value="true" />
<Var name="RenameFields" value="true" />
<Var name="UseUnicodeNames" value="true" />
<Var name="HideStrings" value="true" />
<Var name="OptimizeMethods" value="true" />
<Var name="SuppressIldasm" value="true" />
<Module file="$(InPath)BasicExampleExe.exe" />
<Module file="$(InPath)BasicExampleLibrary.dll" >
<SkipStringHiding type="BasicExampleLibrary.Base1" name="MethodA" />
<SkipStringHiding type="BasicExampleLibrary.Base1" name="MethodB" />
</Module>
</Obfuscator>
public async void MethodA( int param1 ) {
const string DefaultMediaType = "application/json";
var data = new StringContent("testtest", Encoding.UTF8, DefaultMediaType);
string displayText = "sfdsfsfsfddd";
string test = "sfdsfdddddddddddddsfsfddd";
}
public void MethodB( int param1 )
{
const string DefaultMediaType = "application/json";
var data = new StringContent("testtest", Encoding.UTF8, DefaultMediaType);
string displayText = "sfdsfsfsfddd";
string test = "sfdsfdddddddddddddsfsfddd";
}
The result after obfuscation
enter image description here
I want to skip obfuscation for MethodA , but if they are asynchronous methods, the skip configuration does not work.
New contributor
Deakin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.