Esempio n. 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);
        }
Esempio n. 2
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);
        }
Esempio n. 3
0
 private void UpdateAnalyzer()
 {
     _dependencyAnalyzer = ConfigState == AnalyzerConfigState.Enabled
         ? _dependencyAnalyzerCreateFunc()
         : null;
 }
Esempio n. 4
0
 public void AddAnalyzer(IDependencyAnalyzer analyzer)
 {
     _composedAnalyzers.Add(analyzer);
 }
 private void SetUpFactoryCall(IDependencyAnalyzer analyzer)
 {
     _dependencyAnalyzerFactoryMock
     .Setup(i => i.CreateInProcess(It.IsAny <string>(), _typeDependencyEnumeratorMock.Object))
     .Returns(analyzer);
 }