@using SharpIDE.Application.Features.Build @using SharpIDE.Application.Features.SolutionDiscovery @using SharpIDE.Application.Features.SolutionDiscovery.VsPersistence @inherits LayoutComponentBase @inject IDialogService DialogService @inject BuildService BuildService Build Rebuild Clean @if (_solutionFilePath is not null) { } @* *@ @* @Body *@ @if (_solutionFilePath is not null) { } @code { bool _drawerOpen = true; void DrawerToggle() { _drawerOpen = !_drawerOpen; } private string? _solutionFilePath; private SharpIdeSolutionModel? _solutionModel; private SharpIdeFile? _selectedFile; protected override async Task OnInitializedAsync() { var dialogRef = await DialogService.ShowAsync("Open Solution", new DialogOptions { FullWidth = true, MaxWidth = MaxWidth.Medium, BackdropClick = false }); var result = await dialogRef.Result; if (result is null) throw new InvalidOperationException("Dialog result is null"); if (result.Canceled) throw new OperationCanceledException("Dialog was canceled"); var solutionFilePath = (string)result.Data!; _solutionFilePath = solutionFilePath; //await BuildService.BuildSolutionAsync(_solutionFilePath); var solutionModel = await VsPersistenceMapper.GetSolutionModel(_solutionFilePath); _solutionModel = solutionModel; } private async Task BuildSolution() { await BuildService.BuildSolutionAsync(_solutionFilePath!); } }