コード例 #1
0
 public static IEnumerable <MethodMember> GetCalledMethods(this IHasDependencies type)
 {
     return(type.GetMethodCallDependencies().Select(dependency => (MethodMember)dependency.TargetMember));
 }
コード例 #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)));
 }