Exemple #1
0
        /// <summary>
        /// Get the correct CFG for the method.
        /// </summary>
        /// <param name="method"></param>
        /// <returns></returns>
        public ControlFlowGraph GetCFG(Method method)
        {
            ControlFlowGraph cfg;

            if (cfgRepository.Contains(method))
            {
                cfg = (ControlFlowGraph)cfgRepository[method];
            }
            else
            {
                cfg = ControlFlowGraph.For(method);
                cfgRepository.Add(method, cfg);
            }
            return(cfg);
        }