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