csharpdeeb25a2 | 1 | using CascadeIDE.Cockpit; |
| 2 | |
| 3 | namespace CascadeIDE.Features.UiChrome; |
| 4 | |
| 5 | /// <summary> |
| 6 | /// Слой представления для контура IDE Health (build/tests/debug/git): нижняя полоса или отдельная страница зоны. |
| 7 | /// Канал-специфичные имена TOML <c>ide_health_surface</c>; абстрактная ось формы — <see cref="ContentRepresentation"/> (ADR 0063). |
| 8 | /// Не шина событий и не маршрутизация сообщений — только выбор разметки; данные (<see cref="IdeHealthInputSnapshot"/>) от выбора не зависят. |
| 9 | /// </summary> |
| 10 | public enum IdeHealthUiSurface |
| 11 | { |
| 12 | /// <summary>Полоса под workspace (<c>WorkspaceHealthStripView</c>, CLR); <see cref="ContentRepresentation.Strip"/>.</summary> |
| 13 | BottomStrip = 0, |
| 14 | |
| 15 | /// <summary>Отдельная страница в MFD/PFD — полноразметка позже; нижняя полоса скрыта; <see cref="ContentRepresentation.Page"/>.</summary> |
| 16 | DedicatedPage = 1, |
| 17 | } |
| 18 | |
| 19 | /// <summary>ADR 0063: соответствие поверхности IDE Health общей оси <see cref="ContentRepresentation"/>.</summary> |
| 20 | public static class IdeHealthUiSurfaceExtensions |
| 21 | { |
| 22 | /// <summary>BottomStrip → Strip, DedicatedPage → Page.</summary> |
| 23 | public static ContentRepresentation ToContentRepresentation(this IdeHealthUiSurface surface) => |
| 24 | surface switch |
| 25 | { |
| 26 | IdeHealthUiSurface.BottomStrip => ContentRepresentation.Strip, |
| 27 | IdeHealthUiSurface.DedicatedPage => ContentRepresentation.Page, |
| 28 | _ => throw new ArgumentOutOfRangeException(nameof(surface), surface, null), |
| 29 | }; |
| 30 | } |
| 31 | |
View only · write via MCP/CIDE