Exemplo n.º 1
0
 internal AnalyzerResult(
     ProjectAnalyzer analyzer,
     Microsoft.Build.Logging.StructuredLogger.Construction construction,
     TreeNode tree)
 {
     Analyzer      = analyzer;
     _construction = construction;
     _tree         = tree;
 }
Exemplo n.º 2
0
 public ProjectAnalyzer GetProject(string projectPath)
 {
     projectPath = ValidatePath(projectPath);
     if (_projects.TryGetValue(projectPath, out ProjectAnalyzer project))
     {
         return(project);
     }
     project = new ProjectAnalyzer(this, projectPath);
     _projects.Add(projectPath, project);
     return(project);
 }
Exemplo n.º 3
0
 internal AnalyzerResult(
     ProjectAnalyzer analyzer,
     Project project,
     ProjectInstance projectInstance,
     BuildResult buildResult,
     BuildEnvironment buildEnvironment)
 {
     Analyzer         = analyzer;
     Project          = project;
     ProjectInstance  = projectInstance;
     BuildResult      = buildResult;
     BuildEnvironment = buildEnvironment;
 }
Exemplo n.º 4
0
 public ProjectAnalyzer GetProject(string projectPath)
 {
     // Normalise as .sln uses backslash regardless of OS the sln is created on
     projectPath = projectPath.Replace('\\', Path.DirectorySeparatorChar);
     projectPath = ValidatePath(projectPath);
     if (_projects.TryGetValue(projectPath, out ProjectAnalyzer project))
     {
         return(project);
     }
     project = new ProjectAnalyzer(this, projectPath);
     _projects.Add(projectPath, project);
     return(project);
 }
Exemplo n.º 5
0
        private ProjectAnalyzer GetProjectInternal(string projectFilePath, XDocument projectDocument, bool checkExists, BuildEnvironment buildEnvironment)
        {
            buildEnvironment?.Validate();

            // Normalize as .sln uses backslash regardless of OS the sln is created on
            projectFilePath = projectFilePath.Replace('\\', Path.DirectorySeparatorChar);
            projectFilePath = ValidatePath(projectFilePath, checkExists);
            if (_projects.TryGetValue(projectFilePath, out ProjectAnalyzer project))
            {
                return(project);
            }
            project = new ProjectAnalyzer(this, projectFilePath, projectDocument, buildEnvironment);
            _projects.Add(projectFilePath, project);
            return(project);
        }
Exemplo n.º 6
0
        public ProjectAnalyzer GetProject(string projectFilePath)
        {
            if (projectFilePath == null)
            {
                throw new ArgumentNullException(nameof(projectFilePath));
            }

            projectFilePath = NormalizeAndValidatePath(projectFilePath);
            if (_projects.TryGetValue(projectFilePath, out ProjectAnalyzer project))
            {
                return(project);
            }
            project = new ProjectAnalyzer(this, projectFilePath);
            _projects.Add(projectFilePath, project);
            return(project);
        }
Exemplo n.º 7
0
        public ProjectAnalyzer GetProject(string projectFilePath)
        {
            if (projectFilePath == null)
            {
                throw new ArgumentNullException(nameof(projectFilePath));
            }

            // Normalize as .sln uses backslash regardless of OS the sln is created on
            projectFilePath = projectFilePath.Replace('\\', Path.DirectorySeparatorChar);
            projectFilePath = ValidatePath(projectFilePath, true);
            if (_projects.TryGetValue(projectFilePath, out ProjectAnalyzer project))
            {
                return(project);
            }
            project = new ProjectAnalyzer(this, projectFilePath);
            _projects.Add(projectFilePath, project);
            return(project);
        }