113 references to StopCommandStrings
aspire (47)
Commands\StopCommand.cs (45)
60private static readonly OptionWithLegacy<FileInfo?> s_appHostOption = new("--apphost", "--project", StopCommandStrings.ProjectArgumentDescription); 64Description = StopCommandStrings.AllOptionDescription 69Description = StopCommandStrings.ForceOptionDescription 74Description = StopCommandStrings.PidOptionDescription 79Description = StopCommandStrings.VolumesOptionDescription 84Description = StopCommandStrings.WaitOptionDescription 89Description = StopCommandStrings.TimeoutOptionDescription, 110: base("stop", StopCommandStrings.Description, services) 151return CommandResult.Failure(CliExitCodes.InvalidCommand, StopCommandStrings.ProtocolRequiresExactIdentity); 169result = CommandResult.Failure(CliExitCodes.InvalidCommand, string.Format(CultureInfo.CurrentCulture, StopCommandStrings.TimeoutRequiresWait, s_timeoutOption.Name, s_waitOption.Name)); 173result = CommandResult.Failure(CliExitCodes.InvalidCommand, string.Format(CultureInfo.CurrentCulture, StopCommandStrings.TimeoutInvalid, MaximumResourceTeardownTimeoutSeconds)); 194InteractionService.DisplayMessage(KnownEmojis.Information, string.Format(CultureInfo.CurrentCulture, StopCommandStrings.ResourceTeardownMayContinue, s_waitOption.Name)); 206return CommandResult.Failure(CliExitCodes.InvalidCommand, StopCommandStrings.PidMustBePositive); 211return CommandResult.Failure(CliExitCodes.InvalidCommand, string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AllAndProjectMutuallyExclusive, s_pidOption.Name, stopAll ? s_allOption.Name : force ? s_forceOption.Name : s_volumesOption.Name)); 222return CommandResult.Failure(CliExitCodes.FailedToFindProject, string.Format(CultureInfo.InvariantCulture, StopCommandStrings.AllAndProjectMutuallyExclusive, s_allOption.Name, s_appHostOption.Name)); 227return CommandResult.Failure(CliExitCodes.InvalidCommand, string.Format(CultureInfo.InvariantCulture, StopCommandStrings.AllAndProjectMutuallyExclusive, s_allOption.Name, s_forceOption.Name)); 232return CommandResult.Failure(CliExitCodes.InvalidCommand, string.Format(CultureInfo.InvariantCulture, StopCommandStrings.VolumesRequiresForce, s_volumesOption.Name, s_forceOption.Name)); 272? string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostNotRunningWithPid, processId) 273: string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostNotRunningAtPathWithPid, appHostFile.FullName, processId)); 279InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AmbiguousAppHostPid, processId)); 309InteractionService.DisplayError(StopCommandStrings.CouldNotDetermineAppHostPath); 414InteractionService.DisplayError(string.Format(CultureInfo.InvariantCulture, StopCommandStrings.MultipleAppHostsNonInteractive, s_appHostOption.Name, s_allOption.Name)); 432string.Format(CultureInfo.CurrentCulture, SharedCommandStrings.SelectAppHost, StopCommandStrings.SelectAppHostAction), 510string.Format(CultureInfo.CurrentCulture, StopCommandStrings.CleaningPersistentResources, appHostDisplayPath), 518InteractionService.DisplayError(StopCommandStrings.DcpCleanupUnavailable); 525InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, StopCommandStrings.DcpCleanupFailed, appHostDisplayPath, details)); 529InteractionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, StopCommandStrings.PersistentResourcesCleaned, appHostDisplayPath)); 548InteractionService.DisplayMessage(KnownEmojis.PoliceCarLight, StopCommandStrings.DcpCleanupCompatibilityCheckFailed); 554InteractionService.DisplayMessage(KnownEmojis.PoliceCarLight, StopCommandStrings.DcpCleanupCompatibilityCheckFailed); 571? StopCommandStrings.UnknownAspireHostingVersion 574? StopCommandStrings.DcpVolumeCleanupUnsupportedAppHostVersion 575: StopCommandStrings.DcpCleanupUnsupportedAppHostVersion; 678InteractionService.DisplayMessage(KnownEmojis.Package, string.Format(CultureInfo.CurrentCulture, StopCommandStrings.FoundRunningAppHost, appHostIdentifier)); 681InteractionService.DisplayMessage(KnownEmojis.StopSign, string.Format(CultureInfo.CurrentCulture, StopCommandStrings.SendingStopSignal, appHostIdentifier)); 720string.Format(CultureInfo.CurrentCulture, StopCommandStrings.StoppingAppHost, appHostIdentifier), 751InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostLeftRunningDuringResourceTeardown, appHostIdentifier, s_waitOption.Name)); 757InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, StopCommandStrings.FailedToStopAppHost, appHostIdentifier)); 767InteractionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostStoppedSuccessfully, appHostIdentifier)); 799string.Format(CultureInfo.CurrentCulture, StopCommandStrings.WaitingForResourceTeardown, appHostIdentifier), 855ResourceTeardownOutcome.TimedOut => DisplayTeardownError(CliExitCodes.WaitTimeout, StopCommandStrings.ResourceTeardownTimedOut, appHostIdentifier, (int)_resourceTeardownTimeout.TotalSeconds), 856ResourceTeardownOutcome.Unsupported => DisplayTeardownError(CliExitCodes.AppHostIncompatible, StopCommandStrings.ResourceTeardownUnsupported, appHostIdentifier, s_waitOption.Name), 857_ => DisplayTeardownError(CliExitCodes.FailedToDotnetRunAppHost, StopCommandStrings.ResourceTeardownNotConfirmed, appHostIdentifier) 868InteractionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, StopCommandStrings.ResourcesTornDown, appHostIdentifier)); 948? string.Format(CultureInfo.CurrentCulture, StopCommandStrings.DcpCleanupExitCode, cleanupResult.ExitCode) 962? string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostIdentifierWithProcessId, displayPath, appHostInfo.ProcessId)
Commands\StopCommand.TrayProtocol.cs (1)
65InteractionService.DisplayError(StopCommandStrings.ProtocolRequiresExactIdentity);
Resources\StopCommandStrings.Designer.cs (1)
42global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Aspire.Cli.Resources.StopCommandStrings", typeof(StopCommandStrings).Assembly);
Aspire.Cli.Tests (66)
Commands\StopCommandTests.cs (66)
172? string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AmbiguousAppHostPid, pid) 174? string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostNotRunningAtPathWithPid, requestedPath, pid) 175: string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostNotRunningWithPid, pid); 272var identifier = string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostIdentifierWithProcessId, "AppHost.cs", int.MaxValue - 1); 275if (message == string.Format(CultureInfo.CurrentCulture, StopCommandStrings.StoppingAppHost, identifier)) 448var expectedIdentifier1 = string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostIdentifierWithProcessId, expectedPath, processId1); 449var expectedIdentifier2 = string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostIdentifierWithProcessId, expectedPath, processId2); 484Assert.Contains(statusMessages, message => message == string.Format(CultureInfo.CurrentCulture, StopCommandStrings.StoppingAppHost, expectedPath)); 485Assert.Contains(interactionService.DisplayedSuccess, message => message == string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostStoppedSuccessfully, expectedPath)); 536Assert.Contains(statusMessages, message => message == string.Format(CultureInfo.CurrentCulture, StopCommandStrings.StoppingAppHost, expectedPath)); 652message => Assert.Equal(string.Format(CultureInfo.CurrentCulture, StopCommandStrings.FoundRunningAppHost, appHostPath), message), 653message => Assert.Equal(string.Format(CultureInfo.CurrentCulture, StopCommandStrings.SendingStopSignal, appHostPath), message), 654message => Assert.Equal(string.Format(CultureInfo.CurrentCulture, StopCommandStrings.ResourceTeardownMayContinue, "--wait"), message)); 655Assert.Contains(statusMessages, message => message == string.Format(CultureInfo.CurrentCulture, StopCommandStrings.StoppingAppHost, appHostPath)); 770Assert.Contains(interactionService.DisplayedSuccess, message => message == string.Format(CultureInfo.CurrentCulture, StopCommandStrings.PersistentResourcesCleaned, appHostFile.Name)); 852StopCommandStrings.AppHostStoppedSuccessfully, 1357Assert.Contains(StopCommandStrings.DcpCleanupUnavailable, interactionService.DisplayedErrors); 1393Assert.Contains(StopCommandStrings.CouldNotDetermineAppHostPath, interactionService.DisplayedErrors); 1452string.Format(CultureInfo.InvariantCulture, StopCommandStrings.AllAndProjectMutuallyExclusive, "--all", "--force"), 1474string.Format(CultureInfo.InvariantCulture, StopCommandStrings.VolumesRequiresForce, "--volumes", "--force"), 1540string.Format(CultureInfo.CurrentCulture, StopCommandStrings.ResourceTeardownMayContinue, "--wait"), 1579string.Format(CultureInfo.CurrentCulture, StopCommandStrings.ResourceTeardownMayContinue, "--wait") 1620string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostStoppedSuccessfully, "AppHost.csproj"), 1621string.Format(CultureInfo.CurrentCulture, StopCommandStrings.ResourcesTornDown, "AppHost.csproj") 1654? string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostIdentifierWithProcessId, Path.Combine("AppHost", "AppHost.csproj"), connection.AppHostInfo!.ProcessId) 1658string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostStoppedSuccessfully, appHostIdentifier), 1659string.Format(CultureInfo.CurrentCulture, StopCommandStrings.ResourcesTornDown, appHostIdentifier) 1665string.Format(CultureInfo.CurrentCulture, StopCommandStrings.FoundRunningAppHost, appHostIdentifier), 1666string.Format(CultureInfo.CurrentCulture, StopCommandStrings.SendingStopSignal, appHostIdentifier) 1692var stoppingStatus = string.Format(CultureInfo.CurrentCulture, StopCommandStrings.StoppingAppHost, appHostIdentifier); 1728string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostStoppedSuccessfully, appHostIdentifier), 1729string.Format(CultureInfo.CurrentCulture, StopCommandStrings.ResourcesTornDown, appHostIdentifier) 1778string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostStoppedSuccessfully, appHostIdentifier), 1781string.Format(CultureInfo.CurrentCulture, StopCommandStrings.ResourceTeardownTimedOut, appHostIdentifier, expectedTimeoutSeconds), 1816string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostStoppedSuccessfully, appHostIdentifier), 1819string.Format(CultureInfo.CurrentCulture, StopCommandStrings.ResourceTeardownTimedOut, appHostIdentifier, StopCommand.DefaultResourceTeardownTimeoutSeconds), 1850? string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostIdentifierWithProcessId, Path.Combine("AppHost", "AppHost.csproj"), appHostProcess.Id) 1852var stoppingStatus = string.Format(CultureInfo.CurrentCulture, StopCommandStrings.StoppingAppHost, appHostIdentifier); 1884string.Format(CultureInfo.CurrentCulture, StopCommandStrings.ResourceTeardownTimedOut, appHostIdentifier, StopCommand.DefaultResourceTeardownTimeoutSeconds), 1885string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostLeftRunningDuringResourceTeardown, appHostIdentifier, "--wait") 1921? string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostIdentifierWithProcessId, Path.Combine("AppHost", "AppHost.csproj"), appHostProcess.Id) 1923var stoppingStatus = string.Format(CultureInfo.CurrentCulture, StopCommandStrings.StoppingAppHost, appHostIdentifier); 1956string.Format(CultureInfo.CurrentCulture, StopCommandStrings.ResourceTeardownNotConfirmed, appHostIdentifier), 1957string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostLeftRunningDuringResourceTeardown, appHostIdentifier, "--wait") 2008string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostStoppedSuccessfully, appHostIdentifier), 2011string.Format(CultureInfo.CurrentCulture, StopCommandStrings.ResourceTeardownNotConfirmed, appHostIdentifier), 2037var stoppingStatus = string.Format(CultureInfo.CurrentCulture, StopCommandStrings.StoppingAppHost, appHostIdentifier); 2067string.Format(CultureInfo.CurrentCulture, StopCommandStrings.ResourceTeardownNotConfirmed, appHostIdentifier), 2068string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostLeftRunningDuringResourceTeardown, appHostIdentifier, "--wait") 2121string.Format(CultureInfo.CurrentCulture, StopCommandStrings.ResourceTeardownNotConfirmed, "Unknown"), 2122string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostLeftRunningDuringResourceTeardown, "Unknown", "--wait") 2156string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostStoppedSuccessfully, appHostIdentifier), 2159string.Format(CultureInfo.CurrentCulture, StopCommandStrings.ResourceTeardownNotConfirmed, appHostIdentifier), 2197? string.Format(CultureInfo.CurrentCulture, StopCommandStrings.TimeoutInvalid, StopCommand.MaximumResourceTeardownTimeoutSeconds) 2198: string.Format(CultureInfo.CurrentCulture, StopCommandStrings.TimeoutRequiresWait, "--timeout", "--wait"); 2230var stoppingUnsupported = string.Format(CultureInfo.CurrentCulture, StopCommandStrings.StoppingAppHost, Path.Combine("App1", "AppHost.cs")); 2250string.Format(CultureInfo.CurrentCulture, StopCommandStrings.ResourceTeardownUnsupported, Path.Combine("App1", "AppHost.cs"), "--wait"), 2251string.Format(CultureInfo.CurrentCulture, StopCommandStrings.ResourceTeardownNotConfirmed, Path.Combine("App2", "AppHost.cs")) 2281? string.Format(CultureInfo.CurrentCulture, StopCommandStrings.ResourceTeardownNotConfirmed, appHostIdentifier) 2282: string.Format(CultureInfo.CurrentCulture, StopCommandStrings.ResourceTeardownUnsupported, appHostIdentifier, "--wait"); 2318string.Format(CultureInfo.CurrentCulture, StopCommandStrings.ResourceTeardownNotConfirmed, appHostIdentifier), 2322string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostStoppedSuccessfully, appHostIdentifier), 2323string.Format(CultureInfo.CurrentCulture, StopCommandStrings.PersistentResourcesCleaned, appHostFile.Name) 2353var stoppingStatus = string.Format(CultureInfo.CurrentCulture, StopCommandStrings.StoppingAppHost, appHostIdentifier); 2386string.Format(CultureInfo.CurrentCulture, StopCommandStrings.ResourceTeardownNotConfirmed, appHostIdentifier), 2387string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostLeftRunningDuringResourceTeardown, appHostIdentifier, "--wait")