示例#1
0
        void removeInlinedMethods()
        {
            if (!options.InlineMethods || !options.RemoveInlinedMethods)
            {
                return;
            }

            var unusedMethods = new UnusedMethodsFinder(module, methodCallInliner.getInlinedMethods(), getRemovedMethods()).find();
            var removedTypes  = methodCallInliner.getInlinedTypes(unusedMethods);

            addTypesToBeRemoved(removedTypes.getKeys(), "Obfuscator methods type");
            foreach (var method in unusedMethods)
            {
                if (!removedTypes.find(method.DeclaringType))
                {
                    addMethodToBeRemoved(method, "Inlined method");
                }
            }
        }
示例#2
0
        void removeInlinedMethods()
        {
            if (!options.InlineMethods || !options.RemoveInlinedMethods)
                return;

            var unusedMethods = new UnusedMethodsFinder(module, methodCallInliner.getInlinedMethods(), getRemovedMethods()).find();
            var removedTypes = methodCallInliner.getInlinedTypes(unusedMethods);

            addTypesToBeRemoved(removedTypes.getKeys(), "Obfuscator methods type");
            foreach (var method in unusedMethods) {
                if (!removedTypes.find(method.DeclaringType))
                    addMethodToBeRemoved(method, "Inlined method");
            }
        }