15 references to PanelConfirmKind
Aspire.Tray.Tests (15)
src\Aspire.Tray\Common\TrayPanel.cs (12)
163public PanelConfirmKind? Confirmation => _confirm?.Kind; 265BeginConfirm(new(PanelConfirmKind.RemoveMissing, PanelSection.Recent, host)); 653PanelConfirmKind.ClearRecent => new(PanelTargetKind.ClearRecent, confirm.Section, null), 795BeginConfirm(new(PanelConfirmKind.ClearRecent, PanelSection.Recent, null)); 805PanelConfirmKind.ClearRecent => new(PanelActionKind.ClearRecent, Anchor: target.Bounds), 874if (section == PanelSection.Recent && _confirm is { Kind: PanelConfirmKind.ClearRecent }) 888var confirming = _confirm is { Kind: PanelConfirmKind.RemoveMissing } confirm 1455PanelConfirmKind.RemoveMissing => _state.RecentAppHosts.FirstOrDefault(host => host.Id == confirm.Host!.Id), 1458var valid = confirm.Kind == PanelConfirmKind.ClearRecent ? _state.CanClearRecent : current is not null; 1483PanelConfirmKind.ClearRecent => ("Clear recent AppHosts?", "Pinned AppHosts are kept.", "Clear", "Clear recent AppHosts"), 1491Truncation: confirm.Kind == PanelConfirmKind.RemoveMissing ? PanelTruncation.Middle : PanelTruncation.End)); 1744private sealed record PanelConfirm(PanelConfirmKind Kind, PanelSection Section, AppHostMenuItem? Host);
TrayPanelTests.cs (3)
739Assert.Equal(PanelConfirmKind.ClearRecent, panel.Confirmation); 760Assert.Equal(PanelConfirmKind.RemoveMissing, panel.Confirmation); 1483Assert.Equal(PanelConfirmKind.ClearRecent, panel.Confirmation);