Ejemplo n.º 1
0
 public static IEnumerable <MethodMember> GetCalledMethods(this IHasDependencies type)
 {
     return(type.GetMethodCallDependencies().Select(dependency => (MethodMember)dependency.TargetMember));
 }
Ejemplo n.º 2
0
 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)));
 }