4 instantiations of AppHostMenuItem
Aspire.Tray.Tests (4)
Helpers\TrayPanelSamples.cs (2)
14
return
new
(id, AppHostPresentation.GetTitle(info), AppHostPresentation.GetSubtitle(info), AppHostPresentation.GetDisplayName(info),
24
return
new
(info.Id, AppHostPresentation.GetTitle(info), error ?? subtitle, AppHostPresentation.GetDisplayName(info),
src\Aspire.Tray\Common\TrayController.cs (2)
581
return new
AppHostMenuItem
(host.Id, AppHostPresentation.GetTitle(host), subtitle,
643
return
new
(host.Id, AppHostPresentation.GetTitle(host), subtitle, AppHostPresentation.GetDisplayName(host),
48 references to AppHostMenuItem
Aspire.Tray.Tests (48)
Helpers\TrayPanelSamples.cs (2)
9
public static
AppHostMenuItem
Running(string path, int pid, AppHostHealth health = AppHostHealth.Healthy, bool dashboard = true,
21
public static
AppHostMenuItem
Offline(string path, bool pinned = true, bool starting = false, string? error = null, string subtitle = "Stopped")
src\Aspire.Tray\Common\IAppHostClient.cs (2)
86
IReadOnlyList<
AppHostMenuItem
> AppHosts,
89
public IReadOnlyList<
AppHostMenuItem
> RecentAppHosts { get; init; } = [];
src\Aspire.Tray\Common\TrayController.cs (1)
635
private
AppHostMenuItem
CreateSavedMenuItem(SavedAppHost saved, bool live)
src\Aspire.Tray\Common\TrayPanel.cs (16)
255
public PanelResponse ConfirmRemoveMissing(
AppHostMenuItem
host)
653
var
host = target.Host;
777
void Add(ListItemKind kind, double height, PanelSection section,
AppHostMenuItem
? host, PanelTargetKind target = default)
783
void AddSection(PanelSection section, IReadOnlyList<
AppHostMenuItem
> hosts, bool expanded)
803
foreach (
var
host in hosts)
1170
private void AddRow(List<PanelCommand> commands, List<PanelHitTarget> targets,
AppHostMenuItem
host, PanelSection section,
1257
private List<(PanelTargetKind Kind, int Item, PanelIcon Icon, string Label, string Name)> GetRowActions(
AppHostMenuItem
host, PanelSection section)
1288
private void AddActions(List<PanelCommand> commands, List<PanelHitTarget> targets,
AppHostMenuItem
host, PanelSection section,
1340
var
current = confirm.Kind switch
1360
private void AddConfirm(List<PanelCommand> commands, List<PanelHitTarget> targets, PanelConfirm confirm,
AppHostMenuItem
? host,
1512
private void AddTarget(List<PanelHitTarget> targets, PanelTargetKey key, PanelRect bounds, string name, bool enabled,
AppHostMenuItem
? host,
1543
internal static PanelStatusGlyph GetStatusGlyph(
AppHostMenuItem
host, bool live) => host switch
1559
internal static (string Text, bool IsError) GetRowDetail(
AppHostMenuItem
host, bool live, bool showPid)
1581
private static string GetRowAccessibleName(
AppHostMenuItem
host, string detail) => $"{host.DisplayName}, {detail}";
1629
private readonly record struct ListItem(ListItemKind Kind, double Y, double Height, PanelSection Section,
AppHostMenuItem
? Host,
1633
private sealed record PanelConfirm(PanelConfirmKind Kind, PanelSection Section,
AppHostMenuItem
? Host);
src\Aspire.Tray\Common\TrayPanelScene.cs (2)
193
AppHostMenuItem
? Host,
313
internal sealed record PanelAction(PanelActionKind Kind,
AppHostMenuItem
? Host = null, PanelRect Anchor = default)
TrayControllerPinPruningTests.cs (1)
90
var
row = Assert.Single(controller.State.AppHosts);
TrayControllerSavedStateTests.cs (9)
42
var
row = Assert.Single(controller.State.AppHosts.Concat(controller.State.RecentAppHosts));
85
var
row = Assert.Single(controller.State.AppHosts);
142
var
row = Assert.Single(controller.State.RecentAppHosts);
186
var
row = Assert.Single(controller.State.AppHosts);
218
var
live = Assert.Single(controller.State.AppHosts);
234
var
offline = Assert.Single(controller.State.AppHosts);
368
var
timedOut = Assert.Single(controller.State.RecentAppHosts);
376
var
row = Assert.Single(controller.State.AppHosts);
459
var
row = Assert.Single(controller.State.AppHosts);
TrayIconStatusTests.cs (1)
41
var
running = TrayPanelSamples.Running("/src/A/A.AppHost.csproj", 1);
TrayPanelTests.cs (14)
170
foreach (
var
host in state.AppHosts)
187
var
host = state.AppHosts[2];
215
var
host = state.AppHosts[0];
252
var
recent = state.RecentAppHosts[0];
316
var
host = state.AppHosts[0];
366
var
last = state.AppHosts[^1];
567
var
stopping = state.AppHosts.Single(host => host.IsStopping);
568
var
starting = state.AppHosts.Single(host => host.IsStarting);
651
var
missing = state.RecentAppHosts[1];
819
var
host = TrayPanelSamples.Running("/Users/dev/src/eShop/src/eShop.AppHost/eShop.AppHost.csproj", 48213, AppHostHealth.Warning);
842
var
host = TrayPanelSamples.Running("/src/A/A.AppHost.csproj", 1, (AppHostHealth)health, stopping: stopping, error: error ? "Failed." : null);
1411
var
running = state.AppHosts[0];
1412
var
stopped = state.AppHosts[3];
1456
private static PanelHitTarget Target(TrayPanel panel, PanelTargetKind kind,
AppHostMenuItem
host)