using Codelyzer.Analysis.Model; using Microsoft.CodeAnalysis; using System; using System.Collections.Generic; using System.IO; namespace Codelyzer.Analysis.Build { public class ProjectBuildResult : IDisposable { public string ProjectPath { get; set; } public string ProjectRootPath { get; set; } public List SourceFiles { get; private set; } public List SourceFileBuildResults { get; private set; } public List BuildErrors { get; set; } public Project Project { get; set; } public Compilation PrePortCompilation { get; set; } public Compilation Compilation { get; set; } public ExternalReferences ExternalReferences { get; set; } public string TargetFramework { get; set; } public List TargetFrameworks { get; set; } public List PreportReferences { get; set; } public List MissingReferences { get; set; } public string ProjectGuid { get; set; } public string ProjectType { get; set; } public bool IsSyntaxAnalysis { get; set; } public ProjectBuildResult() { SourceFileBuildResults = new List(); SourceFiles = new List(); TargetFrameworks = new List(); PreportReferences = new List(); MissingReferences = new List(); } public bool IsBuildSuccess() { return BuildErrors.Count == 0; } internal void AddSourceFile(string filePath) { var wsPath = Path.GetRelativePath(ProjectRootPath, filePath); SourceFiles.Add(wsPath); } public void Dispose() { Compilation = null; PrePortCompilation = null; } } }