55 references to StopCommandStrings
aspire (36)
Commands\StopCommand.cs (34)
44
private static readonly OptionWithLegacy<FileInfo?> s_appHostOption = new("--apphost", "--project",
StopCommandStrings
.ProjectArgumentDescription);
48
Description =
StopCommandStrings
.AllOptionDescription
53
Description =
StopCommandStrings
.ForceOptionDescription
58
Description =
StopCommandStrings
.PidOptionDescription
63
Description =
StopCommandStrings
.VolumesOptionDescription
82
: base("stop",
StopCommandStrings
.Description, services)
120
return CommandResult.Failure(CliExitCodes.InvalidCommand,
StopCommandStrings
.ProtocolRequiresExactIdentity);
134
return CommandResult.Failure(CompleteStopActivity(activity, CliExitCodes.InvalidCommand),
StopCommandStrings
.PidMustBePositive);
139
return CommandResult.Failure(CompleteStopActivity(activity, CliExitCodes.InvalidCommand), string.Format(CultureInfo.CurrentCulture,
StopCommandStrings
.AllAndProjectMutuallyExclusive, s_pidOption.Name, stopAll ? s_allOption.Name : force ? s_forceOption.Name : s_volumesOption.Name));
150
return CommandResult.Failure(CompleteStopActivity(activity, CliExitCodes.FailedToFindProject), string.Format(CultureInfo.InvariantCulture,
StopCommandStrings
.AllAndProjectMutuallyExclusive, s_allOption.Name, s_appHostOption.Name));
155
return CommandResult.Failure(CompleteStopActivity(activity, CliExitCodes.InvalidCommand), string.Format(CultureInfo.InvariantCulture,
StopCommandStrings
.AllAndProjectMutuallyExclusive, s_allOption.Name, s_forceOption.Name));
160
return CommandResult.Failure(CompleteStopActivity(activity, CliExitCodes.InvalidCommand), string.Format(CultureInfo.InvariantCulture,
StopCommandStrings
.VolumesRequiresForce, s_volumesOption.Name, s_forceOption.Name));
200
? string.Format(CultureInfo.CurrentCulture,
StopCommandStrings
.AppHostNotRunningWithPid, processId)
201
: string.Format(CultureInfo.CurrentCulture,
StopCommandStrings
.AppHostNotRunningAtPathWithPid, appHostFile.FullName, processId));
207
InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture,
StopCommandStrings
.AmbiguousAppHostPid, processId));
237
InteractionService.DisplayError(
StopCommandStrings
.CouldNotDetermineAppHostPath);
342
InteractionService.DisplayError(string.Format(CultureInfo.InvariantCulture,
StopCommandStrings
.MultipleAppHostsNonInteractive, s_appHostOption.Name, s_allOption.Name));
360
string.Format(CultureInfo.CurrentCulture, SharedCommandStrings.SelectAppHost,
StopCommandStrings
.SelectAppHostAction),
438
string.Format(CultureInfo.CurrentCulture,
StopCommandStrings
.CleaningPersistentResources, appHostDisplayPath),
446
InteractionService.DisplayError(
StopCommandStrings
.DcpCleanupUnavailable);
453
InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture,
StopCommandStrings
.DcpCleanupFailed, appHostDisplayPath, details));
457
InteractionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture,
StopCommandStrings
.PersistentResourcesCleaned, appHostDisplayPath));
476
InteractionService.DisplayMessage(KnownEmojis.Warning,
StopCommandStrings
.DcpCleanupCompatibilityCheckFailed);
482
InteractionService.DisplayMessage(KnownEmojis.Warning,
StopCommandStrings
.DcpCleanupCompatibilityCheckFailed);
499
?
StopCommandStrings
.UnknownAspireHostingVersion
502
?
StopCommandStrings
.DcpVolumeCleanupUnsupportedAppHostVersion
503
:
StopCommandStrings
.DcpCleanupUnsupportedAppHostVersion;
596
InteractionService.DisplayMessage(KnownEmojis.Package, string.Format(CultureInfo.CurrentCulture,
StopCommandStrings
.FoundRunningAppHost, appHostIdentifier));
599
InteractionService.DisplayMessage(KnownEmojis.StopSign, string.Format(CultureInfo.CurrentCulture,
StopCommandStrings
.SendingStopSignal, appHostIdentifier));
602
string.Format(CultureInfo.CurrentCulture,
StopCommandStrings
.StoppingAppHost, appHostIdentifier),
618
InteractionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture,
StopCommandStrings
.AppHostStoppedSuccessfully, appHostIdentifier));
623
InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture,
StopCommandStrings
.FailedToStopAppHost, appHostIdentifier));
673
? string.Format(CultureInfo.CurrentCulture,
StopCommandStrings
.DcpCleanupExitCode, cleanupResult.ExitCode)
687
? string.Format(CultureInfo.CurrentCulture,
StopCommandStrings
.AppHostIdentifierWithProcessId, displayPath, appHostInfo.ProcessId)
Commands\StopCommand.TrayProtocol.cs (1)
63
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 (19)
Commands\StopCommandTests.cs (19)
170
? string.Format(CultureInfo.CurrentCulture,
StopCommandStrings
.AmbiguousAppHostPid, pid)
172
? string.Format(CultureInfo.CurrentCulture,
StopCommandStrings
.AppHostNotRunningAtPathWithPid, requestedPath, pid)
173
: string.Format(CultureInfo.CurrentCulture,
StopCommandStrings
.AppHostNotRunningWithPid, pid);
270
var identifier = string.Format(CultureInfo.CurrentCulture,
StopCommandStrings
.AppHostIdentifierWithProcessId, "AppHost.cs", int.MaxValue - 1);
273
if (message == string.Format(CultureInfo.CurrentCulture,
StopCommandStrings
.StoppingAppHost, identifier))
446
var expectedIdentifier1 = string.Format(CultureInfo.CurrentCulture,
StopCommandStrings
.AppHostIdentifierWithProcessId, expectedPath, processId1);
447
var expectedIdentifier2 = string.Format(CultureInfo.CurrentCulture,
StopCommandStrings
.AppHostIdentifierWithProcessId, expectedPath, processId2);
482
Assert.Contains(statusMessages, message => message == string.Format(CultureInfo.CurrentCulture,
StopCommandStrings
.StoppingAppHost, expectedPath));
483
Assert.Contains(interactionService.DisplayedSuccess, message => message == string.Format(CultureInfo.CurrentCulture,
StopCommandStrings
.AppHostStoppedSuccessfully, expectedPath));
534
Assert.Contains(statusMessages, message => message == string.Format(CultureInfo.CurrentCulture,
StopCommandStrings
.StoppingAppHost, expectedPath));
650
message => Assert.Equal(string.Format(CultureInfo.CurrentCulture,
StopCommandStrings
.FoundRunningAppHost, appHostPath), message),
651
message => Assert.Equal(string.Format(CultureInfo.CurrentCulture,
StopCommandStrings
.SendingStopSignal, appHostPath), message));
652
Assert.Contains(statusMessages, message => message == string.Format(CultureInfo.CurrentCulture,
StopCommandStrings
.StoppingAppHost, appHostPath));
767
Assert.Contains(interactionService.DisplayedSuccess, message => message == string.Format(CultureInfo.CurrentCulture,
StopCommandStrings
.PersistentResourcesCleaned, appHostFile.Name));
849
StopCommandStrings
.AppHostStoppedSuccessfully,
1354
Assert.Contains(
StopCommandStrings
.DcpCleanupUnavailable, interactionService.DisplayedErrors);
1390
Assert.Contains(
StopCommandStrings
.CouldNotDetermineAppHostPath, interactionService.DisplayedErrors);
1449
string.Format(CultureInfo.InvariantCulture,
StopCommandStrings
.AllAndProjectMutuallyExclusive, "--all", "--force"),
1471
string.Format(CultureInfo.InvariantCulture,
StopCommandStrings
.VolumesRequiresForce, "--volumes", "--force"),