public static IEnumerable <ITypeDependency> GetFieldTypeDependencies(this IHasDependencies type, bool getBackwardsDependencies = false) { return(getBackwardsDependencies ? type.BackwardsDependencies.OfType <FieldTypeDependency>() : type.Dependencies.OfType <FieldTypeDependency>()); }
public static IEnumerable <AttributeMemberDependency> GetAttributeMemberDependencies( this IHasDependencies member, bool getBackwardsDependencies = false) { return(getBackwardsDependencies ? member.BackwardsDependencies.OfType <AttributeMemberDependency>() : member.Dependencies.OfType <AttributeMemberDependency>()); }
public static IEnumerable <MethodCallDependency> GetMethodCallDependencies(this IHasDependencies type, bool getBackwardsDependencies = false) { return(getBackwardsDependencies ? type.BackwardsDependencies.OfType <MethodCallDependency>() : type.Dependencies.OfType <MethodCallDependency>()); }
public static IEnumerable <IType> GetTypeDependencies(this IHasDependencies c, Architecture architecture) { return(c.Dependencies.Select(dependency => dependency.Target).Intersect(architecture.Types)); }
public static IEnumerable <IType> GetTypeDependencies(this IHasDependencies c) { return(c.Dependencies.Select(dependency => dependency.Target)); }
public static bool OnlyDependsOn(this IHasDependencies c, string pattern, bool useRegularExpressions = false) { return(c.GetTypeDependencies().All(d => d.FullNameMatches(pattern, useRegularExpressions))); }
public static IEnumerable <MethodMember> GetCalledMethods(this IHasDependencies type) { return(type.Dependencies.OfType <MethodCallDependency>() .Select(dependency => (MethodMember)dependency.TargetMember)); }
public static bool CallsMethod(this IHasDependencies type, string pattern, bool useRegularExpressions = false) { return(type.GetCalledMethods().Any(member => member.FullNameMatches(pattern, useRegularExpressions))); }
public static IEnumerable <FieldMember> GetAccessedFieldMembers(this IHasDependencies type) { return(type.Dependencies.OfType <AccessFieldDependency>() .Select(dependency => (FieldMember)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))); }
public static IEnumerable <Interface> GetInterfaceDependencies(this IHasDependencies c, Architecture architecture) { return(c.GetTypeDependencies(architecture).OfType <Interface>()); }
public static IEnumerable <Interface> GetInterfaceDependencies(this IHasDependencies c) { return(c.GetTypeDependencies().OfType <Interface>()); }
public static IEnumerable <Class> GetClassDependencies(this IHasDependencies c, Architecture architecture) { return(c.GetTypeDependencies(architecture).OfType <Class>()); }
public static IEnumerable <Class> GetClassDependencies(this IHasDependencies c) { return(c.GetTypeDependencies().OfType <Class>()); }
public static bool DependsOn(this IHasDependencies c, IType type) { return(c.GetTypeDependencies().Contains(type)); }
public static bool CallsMethod(this IHasDependencies type, MethodMember method) { return(type.GetCalledMethods().Contains(type)); }