コード例 #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
ファイル: Deobfuscator.cs プロジェクト: Joelone/de4dot
        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");
            }
        }