示例#1
0
        private static void PrintMethod(MethodDefinition methodDefinition, Gtk.TextView textView)
        {
            textView.Buffer.Clear();

            var       builder   = new CallGraphBuilder(methodDefinition);
            CallGraph callGraph = builder.Create(5);

            textView.Buffer.Text = callGraph.ToString();
        }
示例#2
0
        private void OnSelectionChanged(object sender, SelectionEventArgs args)
        {
            if (args.definition is MethodDefinition)
            {
                CGPrettyPrinter.PrintPretty(args.definition, textView);
                CGPrettyDrawer drawer = new CGPrettyDrawer(drawingArea);

                var       builder   = new CallGraphBuilder(args.definition as MethodDefinition);
                CallGraph currentCg = builder.Create(2);

                drawer.DrawCallGraph(currentCg);
                if (args.module != null)
                {
                    // Dump the module
                    if (args.assembly != null)
                    {
                        // Dump assembly modules.
                    }
                }
            }
        }