6 instantiations of AppHostId
Aspire.Tray.Tests (6)
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);
src\Aspire.Tray\Common\AppHostInfo.cs (1)
11public AppHostId Id => new(AppHostPath, AppHostPid, ProcessStartTimeUnixMilliseconds);
36 references to AppHostId
Aspire.Tray.Tests (36)
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()
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 = []; 111public AppHostInfo RequireLiveInstance(AppHostId id) 119public Uri GetDashboardUri(AppHostId id) 133public void RequestStop(AppHostId id) 282private AppHostInfo RequireLiveInstanceLocked(AppHostId id) 387private async Task StopAsync(AppHostId id, StopOperation operation)