Forge
csharpdeeb25a2
1#nullable enable
2using System.Diagnostics.CodeAnalysis;
3using CascadeIDE.Contracts;
4
5namespace CascadeIDE.Features.Workspace.Application;
6
7/// <summary>
8/// Корень каталога workspace через <see cref="BreakpointsFileService.GetWorkspaceRoot"/> (палитра GoTo, MCP search_workspace_text).
9/// </summary>
10[ComputingUnit("workspace-root-breakpoints")]
11public static class WorkspaceBreakpointsRootPresentation
12{
13 public static bool TryResolveExistingDirectory(
14 string? solutionPath,
15 [NotNullWhen(true)] out string? root)
16 {
17 root = null;
18 if (string.IsNullOrWhiteSpace(solutionPath))
19 return false;
20
21 var candidate = BreakpointsFileService.GetWorkspaceRoot(solutionPath);
22 if (string.IsNullOrEmpty(candidate) || !Directory.Exists(candidate))
23 return false;
24
25 root = candidate;
26 return true;
27 }
28}
29
View only · write via MCP/CIDE