| 1 | #nullable enable |
| 2 | |
| 3 | namespace CascadeIDE.Features.SolutionWarmup.Application; |
| 4 | |
| 5 | /// <summary>Ключ прогона прогрева (workspace + solution).</summary> |
| 6 | public readonly record struct SolutionWarmupScope(string WorkspaceRoot, string? SolutionPath) |
| 7 | { |
| 8 | public bool IsEmpty => string.IsNullOrWhiteSpace(WorkspaceRoot); |
| 9 | |
| 10 | public bool Matches(string workspaceRoot, string? solutionPath) |
| 11 | { |
| 12 | if (!string.Equals(WorkspaceRoot, workspaceRoot.Trim().TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar), StringComparison.OrdinalIgnoreCase)) |
| 13 | return false; |
| 14 | |
| 15 | var a = string.IsNullOrWhiteSpace(SolutionPath) ? null : SolutionPath.Trim(); |
| 16 | var b = string.IsNullOrWhiteSpace(solutionPath) ? null : solutionPath.Trim(); |
| 17 | return string.Equals(a, b, StringComparison.OrdinalIgnoreCase); |
| 18 | } |
| 19 | } |
| 20 | |
View only · write via MCP/CIDE