コード例 #1
0
		internal DecompilationContext (MethodBody body, ControlFlowGraph cfg)
		{
			this.body = body;
			this.method = body.Method;
			this.variables = CloneCollection (body.Variables);
			this.cfg = cfg;
		}
コード例 #2
0
		static int GetBlockId (ControlFlowGraph cfg, InstructionBlock block)
		{
			return ((IList<InstructionBlock>) cfg.Blocks).IndexOf (block) + 1;
		}
コード例 #3
0
		public static string ToString (ControlFlowGraph cfg)
		{
			StringWriter writer = new StringWriter ();
			FormatControlFlowGraph (writer, cfg);
			return writer.ToString ();
		}
コード例 #4
0
		protected void RunTestCase (string name)
		{
			MethodDefinition method = LoadTestCaseMethod (name);
			ControlFlowGraph cfg = ControlFlowGraph.Create (method);
			Assert.AreEqual (Normalize (LoadExpectedControlFlowString (name)), Normalize (ToString (cfg)));
		}
コード例 #5
0
 	public void add_Nodes(TreeNode treeNode, ControlFlowGraph controlFlowGraph)
 	{
 		foreach(var block in controlFlowGraph.Blocks)
 		{
 			var nodeText = string.Format("Block #{0}", block.Index);
 			tvDirectoriesAndFiles.add_Node(treeNode,nodeText,block,true);
 		}
 	}