75 references to AddCommandStrings
aspire (52)
Commands\AddCommand.cs (32)
42
Description =
AddCommandStrings
.IntegrationArgumentDescription,
45
private static readonly OptionWithLegacy<FileInfo?> s_appHostOption = new("--apphost", "--project",
AddCommandStrings
.ProjectArgumentDescription);
48
Description =
AddCommandStrings
.VersionArgumentDescription
52
Description =
AddCommandStrings
.SourceArgumentDescription
56
Description =
AddCommandStrings
.AllArgumentDescription
60
: base("add",
AddCommandStrings
.Description, services)
116
return AddCommandFailure(CliExitCodes.InvalidCommand,
AddCommandStrings
.NonInteractiveRequiresIntegrationName);
122
InteractionService.DisplayError(
AddCommandStrings
.SourceWithCredentialsNotSupported);
211
AddCommandStrings
.SearchingForAspirePackages,
225
AddCommandStrings
.SearchingForAspirePackages,
250
throw new EmptyChoicesException(
AddCommandStrings
.NoIntegrationPackagesFound);
261
return AddCommandFailure(CliExitCodes.FailedToAddPackage,
AddCommandStrings
.NoPackagesFound);
275
var notCompatibleMessage = string.Format(CultureInfo.CurrentCulture,
AddCommandStrings
.IntegrationNotPolyglotCompatible, integrationName, project.LanguageId);
287
return AddCommandFailure(CliExitCodes.FailedToAddPackage,
AddCommandStrings
.NoPolyglotCompatibleIntegrationsFound);
292
InteractionService.DisplaySubtleMessage(string.Format(CultureInfo.CurrentCulture,
AddCommandStrings
.PolyglotIntegrationsHidden, hiddenIntegrationCount));
311
? string.Format(CultureInfo.CurrentCulture,
AddCommandStrings
.SpecifiedVersionRequiresExactPackageMatch, integrationName)
312
: string.Format(CultureInfo.CurrentCulture,
AddCommandStrings
.NonInteractiveRequiresExactPackageMatch, integrationName);
365
InteractionService.DisplayError(
AddCommandStrings
.SourceWithCredentialsNotSupported);
469
InteractionService.DisplayMessage(KnownEmojis.Information,
AddCommandStrings
.StoppedRunningInstance);
473
return AddCommandFailure(CliExitCodes.FailedToAddPackage,
AddCommandStrings
.UnableToStopRunningInstances);
480
AddCommandStrings
.AddingAspireIntegration,
496
return AddCommandFailure(CliExitCodes.FailedToAddPackage, string.Format(CultureInfo.CurrentCulture,
AddCommandStrings
.PackageInstallationFailed, CliExitCodes.FailedToAddPackage));
499
InteractionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture,
AddCommandStrings
.PackageAddedSuccessfully, selectedNuGetPackage.Package.Id, selectedNuGetPackage.Package.Version));
525
var errorMessage = string.Format(CultureInfo.CurrentCulture,
AddCommandStrings
.ErrorOccurredWhileAddingPackage, ex.Message);
570
AddCommandStrings
.PackageInstallationFailed, CliExitCodes.FailedToAddPackage)),
722
_ => throw new InvalidOperationException(
AddCommandStrings
.UnexpectedNumberOfPackagesFound)
744
string.Format(CultureInfo.CurrentCulture,
AddCommandStrings
.SearchingForSpecifiedPackageVersion, selectedPackage.Package.Id, preferredVersion),
752
throw new EmptyChoicesException(string.Format(CultureInfo.CurrentCulture,
AddCommandStrings
.SpecifiedVersionNotFoundForPackage, selectedPackage.Package.Id, preferredVersion));
833
InteractionService.DisplaySubtleMessage(string.Format(CultureInfo.CurrentCulture,
AddCommandStrings
.NoPackagesMatchedSearchTerm, searchTerm));
889
string.Format(CultureInfo.CurrentCulture,
AddCommandStrings
.SelectAVersionOfPackage, choices[0].Package.Id),
919
AddCommandStrings
.SelectAnIntegrationToAdd,
950
interactionService.DisplayMessage(KnownEmojis.Information,
AddCommandStrings
.IntegrationSourceExplanation);
Commands\IntegrationCommand.cs (1)
17
: base("integration",
AddCommandStrings
.IntegrationCommandDescription, services)
Commands\IntegrationSearchCommand.cs (18)
24
private readonly OptionWithLegacy<FileInfo?> _appHostOption = new("--apphost", "--project",
AddCommandStrings
.IntegrationSearchAppHostOptionDescription);
27
Description =
AddCommandStrings
.FormatOptionDescription
31
Description =
AddCommandStrings
.AllArgumentDescription
89
AddCommandStrings
.SearchingForAspirePackages,
99
AddCommandStrings
.SearchingForAspirePackages,
142
InteractionService.DisplaySubtleMessage(string.Format(CultureInfo.CurrentCulture,
AddCommandStrings
.PolyglotIntegrationsHidden, hiddenIntegrationCount));
158
var errorMessage = string.Format(CultureInfo.CurrentCulture,
AddCommandStrings
.ErrorOccurredWhileSearchingIntegrations, ex.Message);
202
InteractionService.DisplayError(
AddCommandStrings
.NoPolyglotCompatibleIntegrationsFound);
206
InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture,
AddCommandStrings
.NoIntegrationPackagesMatchedSearchTerm, searchTerm));
210
InteractionService.DisplayError(
AddCommandStrings
.NoPackagesFound);
218
InteractionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture,
AddCommandStrings
.FoundIntegrationPackagesMatchingSearchTerm, results.Length, searchTerm));
222
InteractionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture,
AddCommandStrings
.FoundIntegrationPackages, results.Length));
226
table.AddBoldColumn(
AddCommandStrings
.HeaderName);
227
table.AddBoldColumn(
AddCommandStrings
.HeaderPackage);
228
table.AddBoldColumn(
AddCommandStrings
.HeaderVersion);
248
: base("list",
AddCommandStrings
.IntegrationListDescription, integrationPackageSearchService, services)
259
Description =
AddCommandStrings
.IntegrationSearchQueryArgumentDescription,
266
: base("search",
AddCommandStrings
.IntegrationSearchDescription, integrationPackageSearchService, services)
Resources\AddCommandStrings.Designer.cs (1)
42
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Aspire.Cli.Resources.AddCommandStrings", typeof(
AddCommandStrings
).Assembly);
Aspire.Cli.Tests (23)
Commands\AddCommandTests.cs (23)
75
Assert.Equal(
AddCommandStrings
.SelectAnIntegrationToAdd, prompt);
219
Assert.Equal(
AddCommandStrings
.IntegrationSourceExplanation, message.Message);
314
? string.Format(CultureInfo.CurrentCulture,
AddCommandStrings
.SelectAVersionOfPackage, packageId)
315
:
AddCommandStrings
.SelectAnIntegrationToAdd, prompt);
592
Assert.Equal(hasPackages ? [] : [
AddCommandStrings
.NoIntegrationPackagesFound], interactionService.DisplayedErrors);
617
Assert.Equal([
AddCommandStrings
.NonInteractiveRequiresIntegrationName], interactionService.DisplayedErrors);
1154
? string.Format(
AddCommandStrings
.PackageInstallationFailed, CliExitCodes.FailedToAddPackage)
3114
Assert.Contains(
AddCommandStrings
.SearchingForAspirePackages, statusMessages);
3115
Assert.Contains(string.Format(
AddCommandStrings
.SearchingForSpecifiedPackageVersion, "Aspire.Hosting.Redis", "13.2.0"), statusMessages);
3459
Assert.Contains(
AddCommandStrings
.SourceWithCredentialsNotSupported, testInteractionService.DisplayedErrors);
3493
Assert.Contains(testInteractionService.DisplayedErrors, e => e.Contains(
AddCommandStrings
.NoIntegrationPackagesFound));
3569
Assert.Equal(string.Format(
AddCommandStrings
.NoPackagesMatchedSearchTerm, "nonexistentpackage"), displayedSubtleMessage);
3625
message => message.Message ==
AddCommandStrings
.IntegrationSourceExplanation));
4961
Assert.Equal(string.Format(
AddCommandStrings
.PolyglotIntegrationsHidden, 1), displayedSubtleMessage);
5008
Assert.Contains(
AddCommandStrings
.NoPolyglotCompatibleIntegrationsFound, testInteractionService.DisplayedErrors);
5057
Assert.Contains(string.Format(
AddCommandStrings
.NoIntegrationPackagesMatchedSearchTerm, "zzznomatch"), testInteractionService.DisplayedErrors);
5059
Assert.Equal(string.Format(
AddCommandStrings
.PolyglotIntegrationsHidden, 1), displayedSubtleMessage);
5449
Assert.Contains(string.Format(
AddCommandStrings
.NonInteractiveRequiresExactPackageMatch, "kube"), testInteractionService.DisplayedErrors);
5628
integrationName == "zzzzzzzzzz" ? string.Format(
AddCommandStrings
.NoPackagesMatchedSearchTerm, integrationName) : string.Empty,
5683
Assert.Contains(string.Format(
AddCommandStrings
.SpecifiedVersionRequiresExactPackageMatch, "postgre"), testInteractionService.DisplayedErrors);
5735
Assert.Contains(string.Format(
AddCommandStrings
.SpecifiedVersionRequiresExactPackageMatch, "nonexistentpackage"), testInteractionService.DisplayedErrors);
6074
Assert.Equal(string.Format(
AddCommandStrings
.NoPackagesMatchedSearchTerm, "nonexistentpackage"), displayedSubtleMessage);
6162
Assert.Equal(string.Format(
AddCommandStrings
.NoPackagesMatchedSearchTerm, "nonexistentpackage"), displayedSubtleMessage);