33 references to StopOutcome
Aspire.Tray.Tests (33)
CliAppHostCommandsTests.cs (5)
88Assert.Equal(new StopResult(exitCode == 0 ? StopOutcome.Stopped : StopOutcome.Failed, exitCode), 142Assert.Equal(new StopResult(StopOutcome.TimedOut, null), await task.ConfigureAwait(true)); 157Assert.Equal(StopOutcome.Incompatible, result.Outcome); 172Assert.Equal(new StopResult(StopOutcome.TimedOut, null), await task.ConfigureAwait(true));
src\Aspire.Tray\Common\CliAppHostCommands.cs (2)
136return new(StopOutcome.TimedOut, null); 140return new(StopOutcome.Incompatible, process.HasExited ? process.ExitCode : null);
src\Aspire.Tray\Common\CliProtocol.cs (8)
83public static StopOutcome GetStopOutcome(string outcome) => outcome switch 85"stopped" => StopOutcome.Stopped, 86"not_found" => StopOutcome.NotFound, 87"ambiguous" => StopOutcome.Ambiguous, 88"identity_mismatch" => StopOutcome.IdentityMismatch, 89"identity_unavailable" => StopOutcome.IdentityUnavailable, 90"stop_failed" => StopOutcome.Failed, 91"invalid_request" => StopOutcome.Incompatible,
src\Aspire.Tray\Common\IAppHostClient.cs (1)
55internal sealed record StopResult(StopOutcome Outcome, int? ExitCode);
src\Aspire.Tray\Common\TrayController.cs (11)
289if (_stops.TryGetValue(id, out var operation) && operation.Result?.Outcome == StopOutcome.Stopped) 402result = new(StopOutcome.Failed, null); 405if (result.Outcome != StopOutcome.Stopped) 596var stopped = stop?.Result?.Outcome == StopOutcome.Stopped; 698null or StopOutcome.Stopped => null, 699StopOutcome.NotFound => "This AppHost is no longer running.", 700StopOutcome.Ambiguous => "The CLI could not identify a unique AppHost.", 701StopOutcome.IdentityMismatch => "The AppHost process changed. Refresh before stopping it.", 702StopOutcome.IdentityUnavailable => "The process identity could not be verified.", 703StopOutcome.TimedOut => "Stop timed out. The shutdown may still complete.", 704StopOutcome.Incompatible => "Incompatible CLI stop response. Use the matching Aspire build.",
TrayControllerSavedStateTests.cs (3)
232client.CompleteStop(first.Id, new(StopOutcome.Stopped, 0)); 544client.CompleteStop(host.Id, new(StopOutcome.Failed, 7)); 552client.CompleteStop(host.Id, new(StopOutcome.Stopped, 0));
TrayControllerTests.cs (3)
53client.CompleteStop(second.Id, new(StopOutcome.Stopped, 0)); 59client.CompleteStop(first.Id, new(StopOutcome.Stopped, 0)); 139client.CompleteStop(first.Id, new(StopOutcome.TimedOut, null));