Process() public method

public Process ( AssemblyDefinition assembly ) : bool
assembly Mono.Cecil.AssemblyDefinition
return bool
Ejemplo n.º 1
0
 public void IgnoresAccessibility()
 {
     var target = GetTarget("String");
     var obfuscator = new StringObfuscator();
     Assert.IsTrue(obfuscator.Process(target));
     Assert.Contains("Public", obfuscator.FoundStrings, "Missed public accessibility");
     Assert.Contains("Private", obfuscator.FoundStrings, "Missed private accessibility");
     Assert.Contains("Protected", obfuscator.FoundStrings, "Missed protected accessibility");
     Assert.Contains("Internal", obfuscator.FoundStrings, "Missed internal accessibility");
 }
Ejemplo n.º 2
0
        public void DoesNotCorruptBranches()
        {
            var targetGenerator = new BranchesTestTarget();
            var target = targetGenerator.Generate();
            var sizeBefore = targetGenerator.EntryMethod.Body.Instructions.Count;

            var obfuscator = new StringObfuscator();
            Assert.IsTrue(obfuscator.Process(target));

            var sizeAfter = targetGenerator.EntryMethod.Body.Instructions.Count;
            Assert.Greater(sizeAfter, sizeBefore);

            BranchHelper.VerifyBranches(targetGenerator.EntryMethod);
        }
Ejemplo n.º 3
0
 public void ProcessesTestTarget()
 {
     var target = GetTarget("String");
     var obfuscator = new StringObfuscator();
     Assert.IsTrue(obfuscator.Process(target));
 }