AnalyseCsProj(IDependencyAnalyzer dependencyAnalyzer, CsProjParser csProjParser) { var startTime = DateTime.Now; var analyzerMessages = dependencyAnalyzer .AnalyzeProject(csProjParser.SourceFilePaths, csProjParser.ReferencedAssemblyPaths) .ToArray(); var endTime = DateTime.Now; var elapsedTimeSpan = endTime - startTime; return(elapsedTimeSpan, analyzerMessages); }
public IEnumerable <TypeDependency> AnalyzeProject(IEnumerable <string> sourceFilePaths, IEnumerable <string> referencedAssemblyPaths) { _configRefreshLock.EnterReadLock(); try { EnsureValidStateForAnalysis(); return(_dependencyAnalyzer.AnalyzeProject(sourceFilePaths, referencedAssemblyPaths)); } finally { _configRefreshLock.ExitReadLock(); } }
private static TimeSpan AnalyseCsProj(IDependencyAnalyzer dependencyAnalyzer, CsProjParser csProjParser) { var startTime = DateTime.Now; var illegalDependencies = dependencyAnalyzer.AnalyzeProject(csProjParser.SourceFilePaths, csProjParser.ReferencedAssemblyPaths).ToList(); var endTime = DateTime.Now; var elapsedTimeSpan = endTime - startTime; Console.WriteLine($"Analysis took: {elapsedTimeSpan:mm\\:ss\\.fff}"); DumpIllegalDependencies(illegalDependencies); return(elapsedTimeSpan); }