162 references to NewCommandStrings
aspire (96)
Commands\NewCommand.cs (34)
46Description = NewCommandStrings.NameArgumentDescription, 51Description = NewCommandStrings.OutputArgumentDescription, 56Description = NewCommandStrings.SourceArgumentDescription, 61Description = NewCommandStrings.VersionArgumentDescription, 66Description = NewCommandStrings.TemplatePathOptionDescription 70Description = NewCommandStrings.TemplateRepositoryOptionDescription 74Description = NewCommandStrings.TemplateRepositoryRefOptionDescription 97: base("new", NewCommandStrings.Description, services) 129? NewCommandStrings.ChannelOptionDescriptionWithStaging 130: NewCommandStrings.ChannelOptionDescription, 137Description = NewCommandStrings.LanguageOptionDescription, 354InteractionService.DisplayError(NewCommandStrings.NonInteractiveTemplateRequired); 390var builtInGroup = new SelectionChoiceGroup("builtin", NewCommandStrings.BuiltInTemplates); 406NewCommandStrings.SelectAProjectTemplate, choices, choice => choice.Label.EscapeMarkup(), 466NewCommandStrings.ResolvingTemplateVersion, 519errorMessage = NewCommandStrings.NoPackageChannelsAvailable; 534NewCommandStrings.NoChannelFoundMatching, 583NewCommandStrings.NoTemplateVersionsFoundInChannel, 606NewCommandStrings.NoMatchingLocalTemplatePackage, 622return CommandResult.Failure(CliExitCodes.InvalidCommand, NewCommandStrings.TemplateRepositoryRefRequiresRepository); 632return CommandResult.Failure(CliExitCodes.InvalidCommand, NewCommandStrings.TemplatePathConflictingOptions); 641InteractionService.DisplayError(NewCommandStrings.SourceWithCredentialsCannotBePersisted); 651NewCommandStrings.SourceDirectoryNotFound, 676return CommandResult.Failure(CliExitCodes.InvalidCommand, NewCommandStrings.ConfiguredTemplateConflictingOptions); 765string.Format(CultureInfo.CurrentCulture, NewCommandStrings.NoLocalTemplatesFound, source.Path)); 770return CommandResult.Failure(CliExitCodes.InvalidCommand, NewCommandStrings.LocalTemplateSelectionRequiresInteraction); 788string.Format(CultureInfo.CurrentCulture, NewCommandStrings.LocalTemplateLoadFailed, ex.Message)); 818string.Format(CultureInfo.CurrentCulture, NewCommandStrings.LocalTemplateLoadFailed, ex.Message)); 984NewCommandStrings.SelectATemplateVersion, 1028NewCommandStrings.SelectATemplateVersion, 1045NewCommandStrings.EnterTheOutputPath, 1059NewCommandStrings.EnterTheProjectName, 1063: ValidationResult.Error(NewCommandStrings.InvalidProjectName), 1070NewCommandStrings.SelectAProjectTemplate,
Commands\TemplateManagementCommand.cs (20)
22: base("template", NewCommandStrings.TemplateCommandDescription, services) 29internal static Argument<string> NameArgument { get; } = new("name") { Description = NewCommandStrings.TemplateSourceNameDescription }; 30internal static Option<string?> PathOption { get; } = new("--path") { Description = NewCommandStrings.TemplateSourcePathDescription }; 31internal static Option<string?> RepositoryOption { get; } = new("--repository") { Description = NewCommandStrings.TemplateSourceRepositoryDescription }; 32internal static Option<string?> RefOption { get; } = new("--ref") { Description = NewCommandStrings.TemplateSourceRefDescription }; 68: base("source", NewCommandStrings.TemplateSourceCommandDescription, services) 82: base("list", NewCommandStrings.TemplateSourceListDescription, services) 108return CommandResult.Failure(CliExitCodes.InvalidCommand, NewCommandStrings.TemplateSourceReadFailed); 125InteractionService.DisplayMessage(KnownEmojis.Information, NewCommandStrings.TemplateSourceListEmpty); 131.AddBoldColumn(NewCommandStrings.TemplateSourceConfigurationHeader); 151Description = NewCommandStrings.TemplateSourceYesOptionDescription 156: base("add", NewCommandStrings.TemplateSourceAddDescription, services) 175string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateSourceTrustPrompt, 185InteractionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateSourceAdded, options.Name)); 194return CommandResult.Failure(CliExitCodes.InvalidCommand, NewCommandStrings.TemplateSourceWriteFailed); 201private readonly Argument<string> _name = new("name") { Description = NewCommandStrings.TemplateSourceNameDescription }; 205: base("remove", NewCommandStrings.TemplateSourceRemoveDescription, services) 219string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateSourceNotFound, name)); 221InteractionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateSourceRemoved, name)); 230return CommandResult.Failure(CliExitCodes.InvalidCommand, NewCommandStrings.TemplateSourceWriteFailed);
Configuration\ConfigSourceService.cs (1)
419throw new TemplateSourceConfigurationException(AspireConfigFile.TemplateSourcesSectionName, NewCommandStrings.TemplateSourcesMustBeObject);
Resources\NewCommandStrings.Designer.cs (1)
42global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Aspire.Cli.Resources.NewCommandStrings", typeof(NewCommandStrings).Assembly);
Templating\ConfiguredTemplateSourceService.cs (3)
54throw new TemplateSourceConfigurationException($"{AspireConfigFile.TemplateSourcesSectionName}.{name}", NewCommandStrings.InvalidConfiguredTemplateSource); 73interactionService.DisplayMessage(KnownEmojis.Information, NewCommandStrings.NoConfiguredTemplateSources); 116CultureInfo.CurrentCulture, NewCommandStrings.TemplateSourceSearchFailed, source, message));
Templating\OutputPathHelper.cs (6)
102var subdirectoryChoice = string.Format(CultureInfo.CurrentCulture, NewCommandStrings.CreateProjectNameSubdirectoryChoice, projectName); 104NewCommandStrings.SelectProjectCreationLocation, 105[subdirectoryChoice, NewCommandStrings.CreateProjectDirectlyInSelectedFolderChoice], 131return string.Format(CultureInfo.CurrentCulture, NewCommandStrings.OutputPathContainsInvalidCharacters, path); 137var format = isExplicitOutput ? NewCommandStrings.OutputDirectoryNotEmptyNonInteractive : NewCommandStrings.OutputDirectoryNotEmptyInteractive;
Templating\TemplateEngineFactory.cs (9)
94string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateDirectoryNotFound, fullPath)); 117string.Format(CultureInfo.CurrentCulture, NewCommandStrings.LocalTemplateLoadFailed, 139string.Format(CultureInfo.CurrentCulture, NewCommandStrings.NoLocalTemplatesFound, fullPath)); 213string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateRepositoryRefNotFound, ex.Reference)); 219? string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateRepositoryGitExited, exitCode, ex.Message) 286throw new TemplateDiscoveryException(CliExitCodes.InvalidCommand, NewCommandStrings.TemplateRepositoryPathInvalid); 293string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateDirectoryNotFound, fullPath)); 543NewCommandStrings.NoChannelFoundMatching, 615interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, NewCommandStrings.LocalTemplateCreationFailed, status, errorMessage));
Templating\TemplateNuGetConfigService.cs (1)
70throw new ArgumentException(Resources.NewCommandStrings.SourceWithCredentialsCannotBePersisted);
Templating\TemplateSource.cs (2)
21throw new TemplateDiscoveryException(CliExitCodes.InvalidCommand, Resources.NewCommandStrings.TemplateRepositoryPathInvalid); 35throw new TemplateDiscoveryException(CliExitCodes.InvalidCommand, Resources.NewCommandStrings.TemplateRepositoryPathInvalid);
Templating\TemplateSourceConfiguration.cs (14)
34throw new TemplateSourceConfigurationException(settingPath, NewCommandStrings.InvalidConfiguredTemplateSource); 55_ => throw new TemplateSourceConfigurationException($"{settingPath}.{property.Name}", NewCommandStrings.TemplateSourceDisplayNameInvalid) 86throw new TemplateSourceConfigurationException($"{settingPath}.displayName", NewCommandStrings.TemplateSourceDisplayNameInvalid); 109throw new TemplateSourceConfigurationException(settingPath, NewCommandStrings.TemplateSourceMissingLocation); 125throw new TemplateSourceConfigurationException(settingPath, NewCommandStrings.TemplateSourceStringRequired); 135throw new TemplateSourceConfigurationException(settingPath, NewCommandStrings.TemplateSourceStringRequired); 143throw new TemplateSourceConfigurationException(settingPath, NewCommandStrings.TemplateSourceInvalidRepository); 151throw new TemplateSourceConfigurationException(AspireConfigFile.TemplateSourcesSectionName, NewCommandStrings.TemplateSourceNameRequired); 163throw new TemplateSourceConfigurationException(settingPath, NewCommandStrings.TemplateRepositoryPathInvalid); 200throw new TemplateSourceConfigurationException(AspireConfigFile.TemplateSourcesSectionName, NewCommandStrings.TemplateSourcesMustBeObject); 205throw new TemplateSourceConfigurationException(key.Replace(':', '.'), NewCommandStrings.TemplateSourceUnknownField); 209throw new TemplateSourceConfigurationException(AspireConfigFile.TemplateSourcesSectionName, NewCommandStrings.TemplateSourcesMustBeObject); 216string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateSourceCannotExtendString, $"{AspireConfigFile.TemplateSourcesSectionName}.{parts[1]}")); 236: Exception(string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateSourceSettingInvalid, settingPath, reason));
Templating\TemplateSourceStore.cs (4)
47throw new TemplateSourceConfigurationException($"{AspireConfigFile.TemplateSourcesSectionName}.{name}", NewCommandStrings.TemplateSourceAlreadyExists); 82throw new TemplateSourceConfigurationException(AspireConfigFile.TemplateSourcesSectionName, NewCommandStrings.TemplateSourceLegacyConfiguration); 93?? throw new TemplateSourceConfigurationException(AspireConfigFile.TemplateSourcesSectionName, NewCommandStrings.TemplateSourcesMustBeObject); 106?? throw new TemplateSourceConfigurationException(AspireConfigFile.TemplateSourcesSectionName, NewCommandStrings.TemplateSourcesMustBeObject);
Utils\ConsoleHelpers.cs (1)
75interactionService.DisplayMessage(KnownEmojis.Information, NewCommandStrings.TemplateSourceExplanation);
Aspire.Cli.Tests (66)
Commands\NewCommandChannelResolutionTests.cs (1)
223NewCommandStrings.NoMatchingLocalTemplatePackage,
Commands\NewCommandLocalTemplateTests.ConfiguredGitSourceObjects.cs (13)
119Assert.Equal([NewCommandStrings.TemplateSourceExplanation, $"[yellow]{SharedCommandStrings.SourceTrustWarning}[/]"], 156NewCommandStrings.TemplateSourceSettingInvalid, 157"templateSources.broken.path", NewCommandStrings.TemplateRepositoryPathInvalid), error.Message); 196message => Assert.Equal(NewCommandStrings.TemplateSourceExplanation, message.Message), 207NewCommandStrings.TemplateSourceSearchFailed, "broken", NewCommandStrings.TemplateRepositoryPathInvalid), 245message => Assert.Equal(NewCommandStrings.TemplateSourceExplanation, message.Message), 255NewCommandStrings.TemplateSourceSearchFailed, "missing", 256string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateDirectoryNotFound, missingPath)), 295message => Assert.Equal(NewCommandStrings.TemplateSourceExplanation, message.Message), 305NewCommandStrings.TemplateSourceSearchFailed, "missing", 306string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateRepositoryRefNotFound, "missing")), 396Assert.Equal([NewCommandStrings.TemplateSourceExplanation, $"[yellow]{SharedCommandStrings.SourceTrustWarning}[/]"],
Commands\NewCommandLocalTemplateTests.ConfiguredGitSources.cs (11)
100[NewCommandStrings.TemplateSourceExplanation, $"[yellow]{SharedCommandStrings.SourceTrustWarning}[/]", 3440 => string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateRepositoryGitExited, 128, ErrorStrings.GitRepositoryUnavailable), 3462 => string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateRepositoryGitExited, 128, ErrorStrings.GitAuthenticationFailed), 348_ => string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateRepositoryRefNotFound, "HEAD") 351message => Assert.Equal(NewCommandStrings.TemplateSourceExplanation, message.Message), 361NewCommandStrings.TemplateSourceSearchFailed, "broken", expectedError), warning.Message); 414Assert.Equal([NewCommandStrings.TemplateSourceExplanation, $"[yellow]{SharedCommandStrings.SourceTrustWarning}[/]"], 648Assert.Equal(NewCommandStrings.TemplateSourceExplanation, messages[0].Message); 655Assert.StartsWith(string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateSourceSearchFailed, "empty", ""), 657Assert.Equal(string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateSourceSearchFailed, "broken", 658string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateRepositoryGitExited, 128, ErrorStrings.GitAuthenticationFailed)),
Commands\NewCommandLocalTemplateTests.ConfiguredSources.cs (8)
37Assert.Equal([NewCommandStrings.TemplateSourceExplanation, $"[yellow]{SharedCommandStrings.SourceTrustWarning}[/]"], 256Assert.Equal([NewCommandStrings.TemplateSourceExplanation, $"[yellow]{SharedCommandStrings.SourceTrustWarning}[/]"], 276Assert.Equal([NewCommandStrings.TemplateSourceExplanation, $"[yellow]{SharedCommandStrings.SourceTrustWarning}[/]"], 303message => Assert.Equal(NewCommandStrings.TemplateSourceExplanation, message.Message), 309NewCommandStrings.TemplateSourceSearchFailed, "missing", ""), message.Message); 315NewCommandStrings.TemplateSourceSearchFailed, "empty", ""), message.Message); 382Assert.Equal(new SelectionChoiceGroup("builtin", NewCommandStrings.BuiltInTemplates), choice.Group)); 449Assert.Equal([NewCommandStrings.TemplateSourceExplanation, $"[yellow]{SharedCommandStrings.SourceTrustWarning}[/]"],
Commands\NewCommandLocalTemplateTests.cs (16)
1047string.Format(CultureInfo.CurrentCulture, NewCommandStrings.NoChannelFoundMatching, "pr-missing", "default"), 1091string.Format(CultureInfo.CurrentCulture, NewCommandStrings.LocalTemplateLoadFailed, 1092NewCommandStrings.SourceWithCredentialsCannotBePersisted), 1155string.Format(CultureInfo.CurrentCulture, NewCommandStrings.NoChannelFoundMatching, "pr-missing", "default"), 1200Assert.Equal(string.Format(NewCommandStrings.LocalTemplateCreationFailed, "MissingMandatoryParam", "Greeting"), Assert.Single(interaction.DisplayedErrors)); 1250Assert.Equal(NewCommandStrings.TemplatePathConflictingOptions, Assert.Single(interaction.DisplayedErrors)); 1303Assert.Equal(NewCommandStrings.LocalTemplateSelectionRequiresInteraction, Assert.Single(interaction.DisplayedErrors)); 1320Assert.Equal(NewCommandStrings.TemplatePathOptionDescription, Assert.Single(newCommand.Options, option => option.Name == "--template-path").Description); 15610 => string.Format(NewCommandStrings.TemplateRepositoryGitExited, 128, ErrorStrings.GitRepositoryUnavailable), 15632 => string.Format(NewCommandStrings.TemplateRepositoryGitExited, 128, ErrorStrings.GitAuthenticationFailed), 1594Assert.Equal(NewCommandStrings.TemplateRepositoryPathInvalid, Assert.Single(interaction.DisplayedErrors)); 1634Assert.Equal(NewCommandStrings.TemplateRepositoryPathInvalid, Assert.Single(interaction.DisplayedErrors)); 1933Assert.Equal(string.Format(NewCommandStrings.TemplateRepositoryRefNotFound, "missing"), exception.Message); 1957Assert.Equal(NewCommandStrings.TemplateRepositoryRefRequiresRepository, Assert.Single(interaction.DisplayedErrors)); 1978Assert.Equal(NewCommandStrings.TemplatePathConflictingOptions, Assert.Single(interaction.DisplayedErrors)); 1997Assert.Equal(NewCommandStrings.TemplatePathConflictingOptions, Assert.Single(interaction.DisplayedErrors));
Commands\NewCommandLocalTemplateTests.SourceList.cs (3)
126Assert.Equal(NewCommandStrings.TemplateSourceListEmpty, Assert.Single(interaction.DisplayedMessages).Message); 166Assert.Equal(NewCommandStrings.TemplateSourceReadFailed, Assert.Single(interaction.DisplayedErrors)); 373Assert.Equal(NewCommandStrings.TemplateSourceListEmpty, Assert.Single(interaction.DisplayedMessages).Message);
Commands\NewCommandLocalTemplateTests.SourceManagement.cs (1)
74Assert.Equal(string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateSourceTrustPrompt, "company", location),
Commands\NewCommandTests.cs (7)
132Assert.Equal(NewCommandStrings.ChannelOptionDescriptionWithStaging, channelOption.Description); 1551Assert.Contains(NewCommandStrings.SourceWithCredentialsCannotBePersisted, interactionService!.DisplayedErrors); 2626e => string.Equals(e, NewCommandStrings.NonInteractiveTemplateRequired, StringComparison.Ordinal)); 3287NewCommandStrings.OutputDirectoryNotEmptyInteractive, 3667var expectedError = string.Format(CultureInfo.CurrentCulture, NewCommandStrings.OutputDirectoryNotEmptyNonInteractive, existingDir.FullName); 3749var expectedError = string.Format(CultureInfo.CurrentCulture, NewCommandStrings.OutputPathContainsInvalidCharacters, invalidPath); 3806var expectedMessage = string.Format(CultureInfo.CurrentCulture, NewCommandStrings.OutputPathContainsInvalidCharacters, invalidPath);
Commands\TemplateSourceStartupTests.cs (1)
255"templateSources", NewCommandStrings.TemplateSourceLegacyConfiguration).Message, error.Message);
Interaction\ConsoleInteractionServiceTests.cs (2)
1608NewCommandStrings.TemplateSourceExplanation, NewCommandStrings.TemplateSourceExplanation],
Templating\TemplateEngineFactoryGitCheckoutTests.cs (1)
108Assert.Equal(string.Format(NewCommandStrings.TemplateRepositoryGitExited, 128, ErrorStrings.GitRepositoryUnavailable), exception.Message);
Templating\TemplateEngineFactoryGitTests.cs (2)
101Assert.Equal(string.Format(NewCommandStrings.TemplateRepositoryRefNotFound, CommitSha), exception.Message); 123Assert.Equal(string.Format(NewCommandStrings.TemplateRepositoryGitExited, 128, ErrorStrings.GitCommandFailed), exception.Message);