private IDependencyRule CreateIndependentOfProjectRule(Pattern dependingNamePattern, Glob dependencyNamePattern, string dependencyType) { var ruleDescription = IndependentRuleMetadata.FormatIndependentRule(dependingNamePattern, dependencyType, dependencyNamePattern); return(new IndependentRule( new JoinedDescribedCondition(new IsFollowingAssemblyCondition(), new HasAssemblyNameMatchingPatternCondition( dependencyNamePattern), ruleDescription), dependingNamePattern, _ruleViolationFactory)); }
private IDependencyRule CreateIndependentOfAssemblyRule( Pattern dependingAssemblyNamePattern, Glob assemblyNamePattern, string dependencyType) { RuleDescription description = IndependentRuleMetadata.FormatIndependentRule( dependingAssemblyNamePattern, dependencyType, assemblyNamePattern); return(new IndependentRule( new DescribedCondition( new HasAssemblyReferenceMatchingCondition(assemblyNamePattern), description), dependingAssemblyNamePattern, _ruleViolationFactory)); }