public AnalyzerManager(string solutionFilePath, string[] projects, AnalyzerManagerOptions options = null)
        {
            options            = options ?? new AnalyzerManagerOptions();
            LoggerVerbosity    = options.LoggerVerbosity;
            ProjectLogger      = options.LoggerFactory?.CreateLogger <ProjectAnalyzer>();
            ProjectTransformer = options.ProjectTransformer;

            if (solutionFilePath != null)
            {
                solutionFilePath  = NormalizeAndValidatePath(solutionFilePath);
                SolutionDirectory = Path.GetDirectoryName(solutionFilePath);
                GetProjectsInSolution(solutionFilePath, projects);
            }
        }
Beispiel #2
0
        public AnalyzerManager(string solutionFilePath, string[] projects, AnalyzerManagerOptions options = null)
        {
            options            = options ?? new AnalyzerManagerOptions();
            LoggerVerbosity    = options.LoggerVerbosity;
            ProjectLogger      = options.LoggerFactory?.CreateLogger <ProjectAnalyzer>();
            ProjectTweaker     = options.ProjectTweaker;
            CleanBeforeCompile = options.CleanBeforeCompile;

            if (solutionFilePath != null)
            {
                solutionFilePath  = ValidatePath(solutionFilePath, true);
                SolutionDirectory = Path.GetDirectoryName(solutionFilePath);
                GetProjectsInSolution(solutionFilePath, projects);
            }
        }
Beispiel #3
0
        public AnalyzerManager(string solutionFilePath, AnalyzerManagerOptions options = null)
        {
            options            = options ?? new AnalyzerManagerOptions();
            LoggerFactory      = options.LoggerFactory;
            ProjectTransformer = options.ProjectTransformer;

            if (!string.IsNullOrEmpty(solutionFilePath))
            {
                SolutionFilePath = NormalizePath(solutionFilePath);
                SolutionFile     = SolutionFile.Parse(SolutionFilePath);

                // Initialize all the projects in the solution
                foreach (ProjectInSolution projectInSolution in SolutionFile.ProjectsInOrder)
                {
                    if (!SupportedProjectTypes.Contains(projectInSolution.ProjectType))
                    {
                        continue;
                    }
                    GetProject(projectInSolution.AbsolutePath, projectInSolution);
                }
            }
        }
Beispiel #4
0
 public AnalyzerManager(string solutionFilePath, AnalyzerManagerOptions options = null)
     : this(solutionFilePath, null, options)
 {
 }
Beispiel #5
0
 public AnalyzerManager(AnalyzerManagerOptions options = null)
     : this(null, null, options)
 {
 }