7 instantiations of AppHostId
Aspire.Tray.Tests (7)
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);
Helpers\TrayPanelSamples.cs (1)
12
var id = new
AppHostId
(path, pid, 1_700_000_000_000 + pid);
src\Aspire.Tray\Common\AppHostInfo.cs (1)
11
public AppHostId Id =>
new
(AppHostPath, AppHostPid, ProcessStartTimeUnixMilliseconds);
41 references to AppHostId
Aspire.Tray.Tests (41)
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()
Helpers\TrayPanelSamples.cs (1)
12
var
id = new AppHostId(path, pid, 1_700_000_000_000 + pid);
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 = [];
91
public AppHostInfo RequireLiveInstance(
AppHostId
id)
99
public Uri GetDashboardUri(
AppHostId
id)
113
public void RequestStop(
AppHostId
id)
262
private AppHostInfo RequireLiveInstanceLocked(
AppHostId
id)
367
private async Task StopAsync(
AppHostId
id, StopOperation operation)
src\Aspire.Tray\Common\TrayPanel.cs (2)
88
private (PanelSection Section,
AppHostId
Host)? _actions;
163
public (PanelSection Section,
AppHostId
Host)? ActionsRow => _actions;
src\Aspire.Tray\Common\TrayPanelScene.cs (1)
165
internal readonly record struct PanelTargetKey(PanelTargetKind Kind, PanelSection Section,
AppHostId
? Host, int Item = 0);
TrayPanelTests.cs (1)
286
var
host = state.AppHosts[0].Id;