コード例 #1
0
        public void VisitMethodBody(MethodDefinition methd)
        {
            if (methd.Body == null)
            {
                return;
            }

            //IActionFlowGraph afg = FlowGraphFactory.CreateActionFlowGraph(cfg);
            PopTreeGraph graph = new PopTreeGraphBuilder().Build(methd);

            foreach (PopTreeList block in graph.PopTreeBlocks)
            {
                IInstructionBlock iblock = block.Block;
                foreach (PopTree tree in block.PopTrees)
                {
                    //tree._PopList
                    //tree._instruction
                    string message = "";
                    if ((message = VisitPopTree(tree, methd.Name)) != null)
                    {
                        Console.WriteLine(message);
                    }
                }
            }
        }
コード例 #2
0
ファイル: Visitor.cs プロジェクト: Robby777/ambientsmell
        public void VisitMethodBody(MethodDefinition methd)
        {
            if (methd.Body == null)
            {
                return;
            }

            //IActionFlowGraph afg = FlowGraphFactory.CreateActionFlowGraph(cfg);
            PopTreeGraph graph = new PopTreeGraphBuilder().Build(methd);
            foreach (PopTreeList block in graph.PopTreeBlocks)
            {
                IInstructionBlock iblock = block.Block;
                foreach (PopTree tree in block.PopTrees)
                {
                    //tree._PopList
                    //tree._instruction
                    string message = "";
                    if ( (message=VisitPopTree(tree,methd.Name)) != null)
                    {
                        Console.WriteLine( message );
                    }
                }
            }
        }