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