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