29 references to AppHostPresentation
Aspire.Tray.Tests (29)
AppHostPresentationTests.cs (18)
15
Assert.Equal("worktree-a",
AppHostPresentation
.GetTitle(host));
16
Assert.Equal($"{Path.Combine("worktree-a", "apphost")} \u00b7 PID 42",
AppHostPresentation
.GetSubtitle(host));
17
Assert.Equal($"apphost - {Path.Combine("worktree-a", "apphost")} (PID 42)",
AppHostPresentation
.GetLabel(host));
18
Assert.Equal(Path.GetFullPath("worktree-a/apphost"),
AppHostPresentation
.GetDirectory(host));
33
Assert.Equal(expected,
AppHostPresentation
.GetDisplayName(host));
34
Assert.Equal(expected,
AppHostPresentation
.GetTitle(host));
43
Assert.Equal("Shop",
AppHostPresentation
.GetTitle(first));
44
Assert.Equal("Shop",
AppHostPresentation
.GetTitle(second));
45
Assert.Equal($"{Path.Combine("worktree-a", "Shop.AppHost")} \u00b7 PID 42",
AppHostPresentation
.GetSubtitle(first));
46
Assert.Equal($"{Path.Combine("worktree-b", "Shop.AppHost")} \u00b7 PID 43",
AppHostPresentation
.GetSubtitle(second));
63
Assert.Equal(name,
AppHostPresentation
.GetDisplayName(host));
64
Assert.Equal(expected,
AppHostPresentation
.GetTitle(host));
65
Assert.Equal(Math.Min(count, 44), StringInfo.ParseCombiningCharacters(
AppHostPresentation
.GetTitle(host)).Length);
78
Assert.Equal(expected,
AppHostPresentation
.GetDisplayName(host));
79
Assert.Equal(expected,
AppHostPresentation
.GetTitle(host));
80
Assert.Equal($"{location} \u00b7 PID 42",
AppHostPresentation
.GetSubtitle(host));
81
Assert.Equal($"{expected} - {location} (PID 42)",
AppHostPresentation
.GetLabel(host));
83
Assert.Equal(Path.GetDirectoryName(path),
AppHostPresentation
.GetDirectory(host));
Helpers\TrayPanelSamples.cs (5)
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 (5)
580
: stopped ? "Stopped; waiting for discovery." :
AppHostPresentation
.GetSubtitle(host));
581
return new AppHostMenuItem(host.Id,
AppHostPresentation
.GetTitle(host), subtitle,
582
AppHostPresentation
.GetDisplayName(host),
643
return new(host.Id,
AppHostPresentation
.GetTitle(host), subtitle,
AppHostPresentation
.GetDisplayName(host),
src\Aspire.Tray\Common\TrayPanel.cs (1)
1577
var detail = $"{status} · {
AppHostPresentation
.GetLocation(host.Id.AppHostPath)}";