public void CheckGoodDependency( ) { string xml = String.Format( @"<?xml version='1.0'?>" + @"<Obfuscator>" + @"<Var name='InPath' value='{0}' />" + @"<Module file='$(InPath)\AssemblyB.dll' />" + @"</Obfuscator>", TestHelper.InputPath); Obfuscar.Obfuscator obfuscator = Obfuscar.Obfuscator.CreateFromXml(xml); }
public static Obfuscar.Obfuscator Obfuscate(string xml) { Obfuscar.Obfuscator obfuscator = Obfuscar.Obfuscator.CreateFromXml(xml); obfuscator.RenameFields( ); obfuscator.RenameParams( ); obfuscator.RenameProperties( ); obfuscator.RenameEvents( ); obfuscator.RenameMethods( ); obfuscator.RenameTypes( ); obfuscator.SaveAssemblies( ); return(obfuscator); }
Obfuscar.ObfuscationMap BuildAndObfuscateAssemblies( ) { string xml = String.Format( @"<?xml version='1.0'?>" + @"<Obfuscator>" + @"<Var name='InPath' value='{0}' />" + @"<Var name='OutPath' value='{1}' />" + @"<Module file='$(InPath)\AssemblyWithSpecializedGenerics.dll' />" + @"</Obfuscator>", TestHelper.InputPath, TestHelper.OutputPath); Obfuscar.Obfuscator obfuscator = TestHelper.BuildAndObfuscate("AssemblyWithSpecializedGenerics", String.Empty, xml); return(obfuscator.Mapping); }
Obfuscar.ObfuscationMap BuildAndObfuscateAssemblies() { string xml = String.Format( @"<?xml version='1.0'?>" + @"<Obfuscator>" + @"<Var name='InPath' value='{0}' />" + @"<Var name='OutPath' value='{1}' />" + @"<Var name='ReuseNames' value='false' />" + @"<Var name='HidePrivateApi' value='true' />" + @"<Module file='$(InPath){2}AssemblyWithSpecializedGenerics.dll' />" + @"</Obfuscator>", TestHelper.InputPath, TestHelper.OutputPath, Path.DirectorySeparatorChar); Obfuscar.Obfuscator obfuscator = TestHelper.BuildAndObfuscate("AssemblyWithSpecializedGenerics", String.Empty, xml); return(obfuscator.Mapping); }
public static Obfuscar.Obfuscator Obfuscate(string xml, bool hideStrings = false) { Obfuscar.Obfuscator obfuscator = Obfuscar.Obfuscator.CreateFromXml(xml); if (hideStrings) { obfuscator.HideStrings(); } obfuscator.RenameFields(); obfuscator.RenameParams(); obfuscator.RenameProperties(); obfuscator.RenameEvents(); obfuscator.RenameMethods(); obfuscator.RenameTypes(); obfuscator.PostProcessing(); obfuscator.SaveAssemblies(true); return(obfuscator); }