public static bool IsCalledBy(this MethodMember member, string pattern, bool useRegularExpressions = false) { return(member.GetMethodCallDependencies(true).Any(dependency => dependency.Origin.FullNameMatches(pattern, useRegularExpressions))); }