13 instantiations of StopResult
Aspire.Tray.Tests (13)
CliAppHostCommandsTests.cs (3)
88
Assert.Equal(new
StopResult
(exitCode == 0 ? StopOutcome.Stopped : StopOutcome.Failed, exitCode),
142
Assert.Equal(new
StopResult
(StopOutcome.TimedOut, null), await task.ConfigureAwait(true));
172
Assert.Equal(new
StopResult
(StopOutcome.TimedOut, null), await task.ConfigureAwait(true));
src\Aspire.Tray\Common\CliAppHostCommands.cs (3)
132
return
new
(CliProtocol.GetStopOutcome(result.Outcome), process.ExitCode);
136
return
new
(StopOutcome.TimedOut, null);
140
return
new
(StopOutcome.Incompatible, process.HasExited ? process.ExitCode : null);
src\Aspire.Tray\Common\TrayController.cs (1)
402
result =
new
(StopOutcome.Failed, null);
TrayControllerSavedStateTests.cs (3)
232
client.CompleteStop(first.Id,
new
(StopOutcome.Stopped, 0));
544
client.CompleteStop(host.Id,
new
(StopOutcome.Failed, 7));
552
client.CompleteStop(host.Id,
new
(StopOutcome.Stopped, 0));
TrayControllerTests.cs (3)
53
client.CompleteStop(second.Id,
new
(StopOutcome.Stopped, 0));
59
client.CompleteStop(first.Id,
new
(StopOutcome.Stopped, 0));
139
client.CompleteStop(first.Id,
new
(StopOutcome.TimedOut, null));
12 references to StopResult
Aspire.Tray.Tests (12)
CliAppHostCommandsTests.cs (2)
155
var
result = await new CliAppHostCommands(cli.Path, TimeSpan.FromSeconds(30))
188
var
result = await new CliAppHostCommands(cli.Path, TimeSpan.FromSeconds(30))
Helpers\TestAppHostClient.cs (4)
15
private readonly ConcurrentDictionary<AppHostId, TaskCompletionSource<
StopResult
>> _stops = new();
46
public async Task<
StopResult
> StopAsync(AppHostId id, CancellationToken cancellationToken)
48
var completion = new TaskCompletionSource<
StopResult
>(TaskCreationOptions.RunContinuationsAsynchronously);
66
public void CompleteStop(AppHostId id,
StopResult
result) => _stops[id].SetResult(result);
src\Aspire.Tray\Common\CliAppHostClient.cs (1)
37
public Task<
StopResult
> StopAsync(AppHostId id, CancellationToken cancellationToken)
src\Aspire.Tray\Common\CliAppHostCommands.cs (1)
105
public async Task<
StopResult
> StopAsync(AppHostId target, CancellationToken cancellationToken)
src\Aspire.Tray\Common\IAppHostClient.cs (1)
9
Task<
StopResult
> StopAsync(AppHostId id, CancellationToken cancellationToken);
src\Aspire.Tray\Common\TrayController.cs (3)
389
StopResult
result;
696
private static string? GetStopError(
StopResult
? result) => result?.Outcome switch
739
public
StopResult
? Result { get; set; }