private bool IsMatchingMethod(MethodReference methodReference, out MethodDefinition matchingMethod) { var lret = false; matchingMethod = null; var declaringType = ""; if (methodReference != null && methodReference.DeclaringType != null && methodReference.DeclaringType.GetElementType() != null) { declaringType = methodReference.DeclaringType.GetElementType().Name; } List<MethodDefinition> typeMethods = null; if (this.myMethodNames.TryGetValue(declaringType, out typeMethods)) { foreach (var searchMethod in typeMethods) { if (methodReference.IsEqual(searchMethod, false)) { lret = true; matchingMethod = searchMethod; break; } } } return lret; }