public void Check(IReadOnlyList <ISourceCodeFileInNamespace> sourceCodeFiles, IAnalysisReportInProgress report) { foreach (var sourceCodeFile in sourceCodeFiles) { _fileContentCheck.ApplyTo(sourceCodeFile, _ruleDescription, report); } report.FinishedEvaluatingRule(_ruleDescription); }
public void Check(IAnalysisReportInProgress report, IProjectDependencyPath dependencyPath) { var dependingAssembly = dependencyPath.AssemblyWithNameMatching(_dependingAssemblyNamePattern); if (dependingAssembly.Exists()) { var dependencyAssembly = dependencyPath.AssemblyMatching(_condition, dependingAssembly); if (dependencyAssembly.IsNotBefore(dependingAssembly)) { var pathRuleViolation = _ruleViolationFactory.PathRuleViolation( _condition.Description(), dependencyPath.SegmentBetween(dependingAssembly, dependencyAssembly)); report.Add(pathRuleViolation); } } report.FinishedEvaluatingRule(_condition.Description()); }