64 references to AddCommandStrings
aspire (49)
Commands\AddCommand.cs (29)
41Description = AddCommandStrings.IntegrationArgumentDescription, 44private static readonly OptionWithLegacy<FileInfo?> s_appHostOption = new("--apphost", "--project", AddCommandStrings.ProjectArgumentDescription); 47Description = AddCommandStrings.VersionArgumentDescription 51Description = AddCommandStrings.SourceArgumentDescription 55Description = AddCommandStrings.AllArgumentDescription 59: base("add", AddCommandStrings.Description, services) 116InteractionService.DisplayError(AddCommandStrings.SourceWithCredentialsNotSupported); 199AddCommandStrings.SearchingForAspirePackages, 211AddCommandStrings.SearchingForAspirePackages, 227throw new EmptyChoicesException(AddCommandStrings.NoIntegrationPackagesFound); 238return AddCommandFailure(CliExitCodes.FailedToAddPackage, AddCommandStrings.NoPackagesFound); 252var notCompatibleMessage = string.Format(CultureInfo.CurrentCulture, AddCommandStrings.IntegrationNotPolyglotCompatible, integrationName, project.LanguageId); 264return AddCommandFailure(CliExitCodes.FailedToAddPackage, AddCommandStrings.NoPolyglotCompatibleIntegrationsFound); 269InteractionService.DisplaySubtleMessage(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.PolyglotIntegrationsHidden, hiddenIntegrationCount)); 288? string.Format(CultureInfo.CurrentCulture, AddCommandStrings.SpecifiedVersionRequiresExactPackageMatch, integrationName) 289: string.Format(CultureInfo.CurrentCulture, AddCommandStrings.NonInteractiveRequiresExactPackageMatch, integrationName); 409InteractionService.DisplayMessage(KnownEmojis.Information, AddCommandStrings.StoppedRunningInstance); 413return AddCommandFailure(CliExitCodes.FailedToAddPackage, AddCommandStrings.UnableToStopRunningInstances); 420AddCommandStrings.AddingAspireIntegration, 436return AddCommandFailure(CliExitCodes.FailedToAddPackage, string.Format(CultureInfo.CurrentCulture, AddCommandStrings.PackageInstallationFailed, CliExitCodes.FailedToAddPackage)); 439InteractionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.PackageAddedSuccessfully, selectedNuGetPackage.Package.Id, selectedNuGetPackage.Package.Version)); 465var errorMessage = string.Format(CultureInfo.CurrentCulture, AddCommandStrings.ErrorOccurredWhileAddingPackage, ex.Message); 592_ => throw new InvalidOperationException(AddCommandStrings.UnexpectedNumberOfPackagesFound) 608string.Format(CultureInfo.CurrentCulture, AddCommandStrings.SearchingForSpecifiedPackageVersion, selectedPackage.Package.Id, preferredVersion), 616throw new EmptyChoicesException(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.SpecifiedVersionNotFoundForPackage, selectedPackage.Package.Id, preferredVersion)); 696InteractionService.DisplaySubtleMessage(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.NoPackagesMatchedSearchTerm, searchTerm)); 748string.Format(CultureInfo.CurrentCulture, AddCommandStrings.SelectAVersionOfPackage, firstPackage.Package.Id), 841string.Format(CultureInfo.CurrentCulture, AddCommandStrings.SelectAVersionOfPackage, firstPackage.Package.Id), 858AddCommandStrings.SelectAnIntegrationToAdd,
Commands\IntegrationCommand.cs (1)
17: base("integration", AddCommandStrings.IntegrationCommandDescription, services)
Commands\IntegrationSearchCommand.cs (18)
24private readonly OptionWithLegacy<FileInfo?> _appHostOption = new("--apphost", "--project", AddCommandStrings.IntegrationSearchAppHostOptionDescription); 27Description = AddCommandStrings.FormatOptionDescription 31Description = AddCommandStrings.AllArgumentDescription 87AddCommandStrings.SearchingForAspirePackages, 95AddCommandStrings.SearchingForAspirePackages, 129InteractionService.DisplaySubtleMessage(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.PolyglotIntegrationsHidden, hiddenIntegrationCount)); 145var errorMessage = string.Format(CultureInfo.CurrentCulture, AddCommandStrings.ErrorOccurredWhileSearchingIntegrations, ex.Message); 189InteractionService.DisplayError(AddCommandStrings.NoPolyglotCompatibleIntegrationsFound); 193InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.NoIntegrationPackagesMatchedSearchTerm, searchTerm)); 197InteractionService.DisplayError(AddCommandStrings.NoPackagesFound); 205InteractionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.FoundIntegrationPackagesMatchingSearchTerm, results.Length, searchTerm)); 209InteractionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.FoundIntegrationPackages, results.Length)); 213table.AddBoldColumn(AddCommandStrings.HeaderName); 214table.AddBoldColumn(AddCommandStrings.HeaderPackage); 215table.AddBoldColumn(AddCommandStrings.HeaderVersion); 235: base("list", AddCommandStrings.IntegrationListDescription, integrationPackageSearchService, services) 246Description = AddCommandStrings.IntegrationSearchQueryArgumentDescription, 253: base("search", AddCommandStrings.IntegrationSearchDescription, integrationPackageSearchService, services)
Resources\AddCommandStrings.Designer.cs (1)
42global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Aspire.Cli.Resources.AddCommandStrings", typeof(AddCommandStrings).Assembly);
Aspire.Cli.Tests (15)
Commands\AddCommandTests.cs (15)
1877Assert.Contains(AddCommandStrings.SearchingForAspirePackages, statusMessages); 1878Assert.Contains(string.Format(AddCommandStrings.SearchingForSpecifiedPackageVersion, "Aspire.Hosting.Redis", "13.2.0"), statusMessages); 2215Assert.Contains(AddCommandStrings.SourceWithCredentialsNotSupported, testInteractionService.DisplayedErrors); 2248Assert.Contains(testInteractionService.DisplayedErrors, e => e.Contains(AddCommandStrings.NoIntegrationPackagesFound)); 2324Assert.Equal(string.Format(AddCommandStrings.NoPackagesMatchedSearchTerm, "nonexistentpackage"), displayedSubtleMessage); 3613Assert.Equal(string.Format(AddCommandStrings.PolyglotIntegrationsHidden, 1), displayedSubtleMessage); 3660Assert.Contains(AddCommandStrings.NoPolyglotCompatibleIntegrationsFound, testInteractionService.DisplayedErrors); 3709Assert.Contains(string.Format(AddCommandStrings.NoIntegrationPackagesMatchedSearchTerm, "zzznomatch"), testInteractionService.DisplayedErrors); 3711Assert.Equal(string.Format(AddCommandStrings.PolyglotIntegrationsHidden, 1), displayedSubtleMessage); 4101Assert.Contains(string.Format(AddCommandStrings.NonInteractiveRequiresExactPackageMatch, "kube"), testInteractionService.DisplayedErrors); 4276Assert.Equal(string.Format(AddCommandStrings.NoPackagesMatchedSearchTerm, "zzzzzzzzzz"), displayedSubtleMessage); 4330Assert.Contains(string.Format(AddCommandStrings.SpecifiedVersionRequiresExactPackageMatch, "postgre"), testInteractionService.DisplayedErrors); 4382Assert.Contains(string.Format(AddCommandStrings.SpecifiedVersionRequiresExactPackageMatch, "nonexistentpackage"), testInteractionService.DisplayedErrors); 4721Assert.Equal(string.Format(AddCommandStrings.NoPackagesMatchedSearchTerm, "nonexistentpackage"), displayedSubtleMessage); 4809Assert.Equal(string.Format(AddCommandStrings.NoPackagesMatchedSearchTerm, "nonexistentpackage"), displayedSubtleMessage);