public static IMethodCallMap GetMap(MethodBase method) { // Reuse the existing map if (_entries.ContainsKey(method)) { return(_entries[method]); } var newMap = new MethodCallMap(); _entries[method] = newMap; return(newMap); }
public static IMethodCallMap GetMap(MethodBase method) { // Reuse the existing map var existingMap = _entries.FirstOrDefault(m => m.ContainsMappingFor(method)); if (existingMap != null) { return(existingMap); } var newMap = new MethodCallMap(); Store(newMap); return(newMap); }