private MethodDescriptor ConstructMethodDescriptor(MethodCallInfo mci, bool special) { MethodBase method = mci.GetStrongestOverride(); MethodDescriptor md = new MethodDescriptor( method, mci.EvaluatedArgumentsWithoutThis, special ? mci.ArgumentVariabilities : VariabilityPattern.CreateDefault(method).Pattern); var caller = mci.CallerTemplate.Decompilee; var callerPd = caller as ProcessDescriptor; var callerMd = caller as MethodDescriptor; if (callerPd != null) { md.CallingProcess = callerPd; } else { md.CallingProcess = callerMd.CallingProcess; } return(md); }
/// <summary> /// Returns a variability analyzer for certain argument variabilities /// </summary> /// <param name="varPattern">argument variabilities</param> /// <returns>the variability analyzer</returns> public VariabilityAnalyzer GetVARA(VariabilityPattern varPattern) { VariabilityAnalyzer result; if (!_varaMap.TryGetValue(varPattern, out result)) { result = new VariabilityAnalyzer(Method, varPattern); result.Run(); _varaMap[varPattern] = result; } return result; }