7 instantiations of AppHostId
Aspire.Tray.Tests (7)
AppHostIdTests.cs (3)
23var first = new AppHostId(path, 42, 1000); 48var first = new AppHostId(Path.GetFullPath("AppHost.cs"), 42, 1000); 61Assert.NotEqual(default, new AppHostId("", 0, null));
CliAppHostCommandsTests.cs (2)
21Assert.Equal(Arguments(new AppHostId(path, 42, 1000)), startInfo.ArgumentList); 352private static AppHostId Host() => new(Path.GetFullPath("project with spaces & apostrophe's/apphost.cs"), 42, 1000);
Helpers\TrayPanelSamples.cs (1)
12var id = new AppHostId(path, pid, 1_700_000_000_000 + pid);
src\Aspire.Tray\Common\AppHostInfo.cs (1)
11public AppHostId Id => new(AppHostPath, AppHostPid, ProcessStartTimeUnixMilliseconds);
41 references to AppHostId
Aspire.Tray.Tests (41)
AppHostIdTests.cs (8)
23var first = new AppHostId(path, 42, 1000); 24var other = first with { AppHostPath = path.ToUpperInvariant() }; 26var ids = new HashSet<AppHostId> { first, other }; 27var values = new Dictionary<AppHostId, string> { [first] = "original" }; 48var first = new AppHostId(Path.GetFullPath("AppHost.cs"), 42, 1000); 49var other = first with { AppHostPid = pid, ProcessStartTimeUnixMilliseconds = startedAt }; 52Assert.True(new HashSet<AppHostId> { first }.Add(other)); 58var values = new Dictionary<AppHostId, string> { [default] = "unbound" };
CliAppHostCommandsTests.cs (4)
28var host = Host(); 86var host = Host(); 352private static AppHostId Host() => new(Path.GetFullPath("project with spaces & apostrophe's/apphost.cs"), 42, 1000); 354private static string[] Arguments(AppHostId host) =>
Helpers\TestAppHostClient.cs (10)
13private readonly Channel<AppHostId> _started = Channel.CreateUnbounded<AppHostId>(); 14private readonly Channel<AppHostId> _finished = Channel.CreateUnbounded<AppHostId>(); 15private readonly ConcurrentDictionary<AppHostId, TaskCompletionSource<StopResult>> _stops = new(); 19public ConcurrentQueue<AppHostId> Requests { get; } = new(); 46public async Task<StopResult> StopAsync(AppHostId id, CancellationToken cancellationToken) 66public void CompleteStop(AppHostId id, StopResult result) => _stops[id].SetResult(result); 105public Task<AppHostId> NextStopAsync() 108public Task<AppHostId> NextFinishedStopAsync()
Helpers\TrayPanelSamples.cs (1)
12var id = new AppHostId(path, pid, 1_700_000_000_000 + pid);
src\Aspire.Tray\Common\AppHostInfo.cs (1)
11public AppHostId Id => new(AppHostPath, AppHostPid, ProcessStartTimeUnixMilliseconds);
src\Aspire.Tray\Common\CliAppHostClient.cs (1)
37public Task<StopResult> StopAsync(AppHostId id, CancellationToken cancellationToken)
src\Aspire.Tray\Common\CliAppHostCommands.cs (2)
17internal static ProcessStartInfo CreateStopStartInfo(string executable, AppHostId target) 105public async Task<StopResult> StopAsync(AppHostId target, CancellationToken cancellationToken)
src\Aspire.Tray\Common\IAppHostClient.cs (3)
9Task<StopResult> StopAsync(AppHostId id, CancellationToken cancellationToken); 17public bool Equals(AppHostId other) 68AppHostId Id,
src\Aspire.Tray\Common\TrayController.cs (7)
17private readonly Dictionary<AppHostId, StopOperation> _stops = []; 19private HashSet<AppHostId> _lastLiveIds = []; 91public AppHostInfo RequireLiveInstance(AppHostId id) 99public Uri GetDashboardUri(AppHostId id) 113public void RequestStop(AppHostId id) 262private AppHostInfo RequireLiveInstanceLocked(AppHostId id) 367private async Task StopAsync(AppHostId id, StopOperation operation)
src\Aspire.Tray\Common\TrayPanel.cs (2)
88private (PanelSection Section, AppHostId Host)? _actions; 163public (PanelSection Section, AppHostId Host)? ActionsRow => _actions;
src\Aspire.Tray\Common\TrayPanelScene.cs (1)
165internal readonly record struct PanelTargetKey(PanelTargetKind Kind, PanelSection Section, AppHostId? Host, int Item = 0);
TrayPanelTests.cs (1)
286var host = state.AppHosts[0].Id;