public static IEnumerable <MethodMember> GetCalledMethods(this IHasDependencies type) { return(type.GetMethodCallDependencies().Select(dependency => (MethodMember)dependency.TargetMember)); }
public static bool CallsAnyMethodFromType(this IHasDependencies type, string pattern, bool useRegularExpressions = false) { return(type.GetMethodCallDependencies().Select(dependency => dependency.Target) .Any(member => member.FullNameMatches(pattern, useRegularExpressions))); }