get project diagnostics
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
@using SharpIDE.Application.Features.SolutionDiscovery.VsPersistence
|
||||
<MudStack Style="height: 100%">
|
||||
|
||||
<MudStack Style="height: 100%; overflow-y: scroll">
|
||||
@foreach (var project in SolutionModel.AllProjects)
|
||||
{
|
||||
<ProjectProblemComponent ProjectModel="@project" />
|
||||
}
|
||||
</MudStack>
|
||||
|
||||
@code {
|
||||
@@ -0,0 +1,29 @@
|
||||
@using System.Collections.Immutable
|
||||
@using Microsoft.CodeAnalysis
|
||||
@using SharpIDE.Application.Features.Analysis
|
||||
@using SharpIDE.Application.Features.SolutionDiscovery.VsPersistence
|
||||
|
||||
@if (_diagnostics.Length is not 0)
|
||||
{
|
||||
@ProjectModel.Name
|
||||
@foreach(var diagnostic in _diagnostics)
|
||||
{
|
||||
<div>
|
||||
<strong>@diagnostic.Id</strong>: @diagnostic.GetMessage()
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
@code {
|
||||
[Parameter, EditorRequired]
|
||||
public SharpIdeProjectModel ProjectModel { get; set; } = null!;
|
||||
|
||||
private ImmutableArray<Diagnostic> _diagnostics = [];
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
var diagnostics = await RoslynAnalysis.GetProjectDiagnostics(ProjectModel);
|
||||
_diagnostics = diagnostics;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,6 +4,7 @@
|
||||
@using SharpIDE.Application.Features.Events
|
||||
@using SharpIDE.Application.Features.SolutionDiscovery
|
||||
@using SharpIDE.Application.Features.SolutionDiscovery.VsPersistence
|
||||
@using SharpIDE.Photino.Components.Problems
|
||||
@using SharpIDE.Photino.Models
|
||||
@inherits LayoutComponentBase
|
||||
|
||||
|
||||
Reference in New Issue
Block a user