Beispiel #1
0
        public List <MethodGraph> AnalyzeSolution(string companyAssembliesPattern, string applicationsPattern, string solutionFolder)
        {
            try
            {
                _logOutput.LogInfo(" ");
                _logOutput.LogInfo("================================================");
                _logOutput.LogInfo("SOLUTION ANALISIS STARTED: " + solutionFolder);

                var solution = GetSolution(solutionFolder, applicationsPattern);
                if (!solution.Applications.Any())
                {
                    _logOutput.LogInfo("No applications found in solution. Process aborted.");
                    return(new List <MethodGraph>());
                }

                AnalysisScope.CurrentSolutionPath = solutionFolder;
                AnalysisScope.CurrentSolutionName = solution.Name;

                var methodGraphs = new List <MethodGraph>();
                foreach (var application in solution.Applications)
                {
                    var methodGraphsOfApp = AnalyzeApplication(companyAssembliesPattern, application);
                    methodGraphs.AddRange(methodGraphsOfApp);
                }

                return(methodGraphs);
            }
            catch (Exception ex)
            {
                _logOutput.LogError("Failed to process solution " + ex);
                return(new List <MethodGraph>());
            }
        }