Beispiel #1
0
        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);
        }
Beispiel #2
0
        public IEnumerable <TypeDependency> AnalyzeProject(IEnumerable <string> sourceFilePaths, IEnumerable <string> referencedAssemblyPaths)
        {
            _configRefreshLock.EnterReadLock();

            try
            {
                EnsureValidStateForAnalysis();
                return(_dependencyAnalyzer.AnalyzeProject(sourceFilePaths, referencedAssemblyPaths));
            }
            finally
            {
                _configRefreshLock.ExitReadLock();
            }
        }
Beispiel #3
0
        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);
        }