Skip to content

Commit

Permalink
update field name
Browse files Browse the repository at this point in the history
  • Loading branch information
xueningl-az committed Oct 30, 2023
1 parent 6b3314f commit 9aeb232
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/PortingAssistant.Client.Analysis/AnalysisHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ private ProjectAnalysisResult AnalyzeProject(
ExternalReferences = analyzer.ProjectResult.ExternalReferences,
ProjectCompatibilityResult = compatibilityResults,
LinesOfCode = analyzer.ProjectResult.LinesOfCode,
HasError = compatibilityCheckerResponse.HasError // compatibilityCheckerResponse Error
HasCompatibilityCheckingError = compatibilityCheckerResponse.HasCompatibilityCheckingError // compatibilityCheckerResponse Error
};
}
catch (Exception ex)
Expand Down Expand Up @@ -654,8 +654,8 @@ private CompatibilityCheckerResponse MergeRecommendationResultToPackageAnalysisR
{
foreach (var packageRecommend in compatibilityCheckerResponse.PackageRecommendationResults)
{
if (packageRecommend.Value?.Recommendations != null &&
compatibilityCheckerResponse.PackageAnalysisResults.ContainsKey(packageRecommend.Key) &&
if (packageRecommend.Value?.Recommendations != null && compatibilityCheckerResponse.PackageAnalysisResults!= null
&& compatibilityCheckerResponse.PackageAnalysisResults.ContainsKey(packageRecommend.Key) &&
compatibilityCheckerResponse.PackageAnalysisResults[packageRecommend.Key].Recommendations == null
)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public SolutionAnalysisResult GenerateSolutionAnalysisResult(string solutionFile
FailedProjects = failedProjects,
SolutionDetails = solutionDetails,
ProjectAnalysisResults = projectAnalysisResults,
HasError = projectAnalysisResults.Any(c=>c.HasError) //if any project has compatibilityCheckerResponse Error
HasCompatibilityCheckingError = projectAnalysisResults.Any(c=>c.HasCompatibilityCheckingError) //if any project has compatibilityCheckerResponse Error
};
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ public class ProjectAnalysisResult : ProjectDetails, IDisposable
public VisualBasicRootNodes VisualBasicProjectRules { get; set; }
public ExternalReferences ExternalReferences { get; set; }
public ProjectCompatibilityResult ProjectCompatibilityResult { get; set; }

public bool HasError { get; set; } //GetCompatibilityResponse HasError
public bool HasCompatibilityCheckingError { get; set; } //GetCompatibilityResponse HasError
public void Dispose()
{
Errors = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ public class SolutionAnalysisResult
public List<ProjectAnalysisResult> ProjectAnalysisResults { get; set; }
public List<string> FailedProjects { get; set; }
public List<string> Errors { get; set; } //Solution errors; solution file errors etc.
public bool HasError { get; set; } //GetCompatibilityResponse HasError for any project
public bool HasCompatibilityCheckingError { get; set; } //GetCompatibilityResponse HasError for any project
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class RecommendationOnlyResponse
public Language Language { get; set; }
public Dictionary<PackageVersionPair, AnalysisResult> PackageRecommendationResults { get; set; }
public Dictionary<PackageVersionPair, Dictionary<string, AnalysisResult>> ApiRecommendationResults { get; set; }
public bool HasError { get; set; } = false;
public bool HasCompatibilityCheckingError { get; set; } = false;
public Recommendations? GetRecommendationsForPackage(PackageVersionPair pkgVersionPair)
{
if (PackageRecommendationResults == null
Expand Down

0 comments on commit 9aeb232

Please sign in to comment.