예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
        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);
        }
예제 #5
0
        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);
        }