162 references to NewCommandStrings
aspire (96)
Commands\NewCommand.cs (34)
43Description = NewCommandStrings.NameArgumentDescription, 48Description = NewCommandStrings.OutputArgumentDescription, 53Description = NewCommandStrings.SourceArgumentDescription, 58Description = NewCommandStrings.VersionArgumentDescription, 63Description = NewCommandStrings.TemplatePathOptionDescription 67Description = NewCommandStrings.TemplateRepositoryOptionDescription 71Description = NewCommandStrings.TemplateRepositoryRefOptionDescription 93: base("new", NewCommandStrings.Description, services) 123? NewCommandStrings.ChannelOptionDescriptionWithStaging 124: NewCommandStrings.ChannelOptionDescription, 131Description = NewCommandStrings.LanguageOptionDescription, 348InteractionService.DisplayError(NewCommandStrings.NonInteractiveTemplateRequired); 379var builtInGroup = new SelectionChoiceGroup("builtin", NewCommandStrings.BuiltInTemplates); 393NewCommandStrings.SelectAProjectTemplate, choices, choice => choice.Label.EscapeMarkup(), 441NewCommandStrings.ResolvingTemplateVersion, 494errorMessage = NewCommandStrings.NoPackageChannelsAvailable; 509NewCommandStrings.NoChannelFoundMatching, 558NewCommandStrings.NoTemplateVersionsFoundInChannel, 581NewCommandStrings.NoMatchingLocalTemplatePackage, 597return CommandResult.Failure(CliExitCodes.InvalidCommand, NewCommandStrings.TemplateRepositoryRefRequiresRepository); 607return CommandResult.Failure(CliExitCodes.InvalidCommand, NewCommandStrings.TemplatePathConflictingOptions); 616InteractionService.DisplayError(NewCommandStrings.SourceWithCredentialsCannotBePersisted); 626NewCommandStrings.SourceDirectoryNotFound, 651return CommandResult.Failure(CliExitCodes.InvalidCommand, NewCommandStrings.ConfiguredTemplateConflictingOptions); 740string.Format(CultureInfo.CurrentCulture, NewCommandStrings.NoLocalTemplatesFound, source.Path)); 745return CommandResult.Failure(CliExitCodes.InvalidCommand, NewCommandStrings.LocalTemplateSelectionRequiresInteraction); 761string.Format(CultureInfo.CurrentCulture, NewCommandStrings.LocalTemplateLoadFailed, ex.Message)); 789string.Format(CultureInfo.CurrentCulture, NewCommandStrings.LocalTemplateLoadFailed, ex.Message)); 938NewCommandStrings.SelectATemplateVersion, 982NewCommandStrings.SelectATemplateVersion, 999NewCommandStrings.EnterTheOutputPath, 1013NewCommandStrings.EnterTheProjectName, 1017: ValidationResult.Error(NewCommandStrings.InvalidProjectName), 1024NewCommandStrings.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)
356throw 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)
49throw new TemplateSourceConfigurationException($"{AspireConfigFile.TemplateSourcesSectionName}.{name}", NewCommandStrings.InvalidConfiguredTemplateSource); 64interactionService.DisplayMessage(KnownEmojis.Information, NewCommandStrings.NoConfiguredTemplateSources); 105CultureInfo.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)
91string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateDirectoryNotFound, fullPath)); 111string.Format(CultureInfo.CurrentCulture, NewCommandStrings.LocalTemplateLoadFailed, 132string.Format(CultureInfo.CurrentCulture, NewCommandStrings.NoLocalTemplatesFound, fullPath)); 199string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateRepositoryRefNotFound, ex.Reference)); 204? string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateRepositoryGitExited, exitCode, ex.Message) 267throw new TemplateDiscoveryException(CliExitCodes.InvalidCommand, NewCommandStrings.TemplateRepositoryPathInvalid); 274string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateDirectoryNotFound, fullPath)); 522NewCommandStrings.NoChannelFoundMatching, 594interactionService.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) 84throw new TemplateSourceConfigurationException($"{settingPath}.displayName", NewCommandStrings.TemplateSourceDisplayNameInvalid); 107throw new TemplateSourceConfigurationException(settingPath, NewCommandStrings.TemplateSourceMissingLocation); 123throw new TemplateSourceConfigurationException(settingPath, NewCommandStrings.TemplateSourceStringRequired); 133throw new TemplateSourceConfigurationException(settingPath, NewCommandStrings.TemplateSourceStringRequired); 141throw new TemplateSourceConfigurationException(settingPath, NewCommandStrings.TemplateSourceInvalidRepository); 149throw new TemplateSourceConfigurationException(AspireConfigFile.TemplateSourcesSectionName, NewCommandStrings.TemplateSourceNameRequired); 161throw new TemplateSourceConfigurationException(settingPath, NewCommandStrings.TemplateRepositoryPathInvalid); 198throw new TemplateSourceConfigurationException(AspireConfigFile.TemplateSourcesSectionName, NewCommandStrings.TemplateSourcesMustBeObject); 203throw new TemplateSourceConfigurationException(key.Replace(':', '.'), NewCommandStrings.TemplateSourceUnknownField); 207throw new TemplateSourceConfigurationException(AspireConfigFile.TemplateSourcesSectionName, NewCommandStrings.TemplateSourcesMustBeObject); 214string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateSourceCannotExtendString, $"{AspireConfigFile.TemplateSourcesSectionName}.{parts[1]}")); 234: 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)
35Assert.Equal([NewCommandStrings.TemplateSourceExplanation, $"[yellow]{SharedCommandStrings.SourceTrustWarning}[/]"], 252Assert.Equal([NewCommandStrings.TemplateSourceExplanation, $"[yellow]{SharedCommandStrings.SourceTrustWarning}[/]"], 272Assert.Equal([NewCommandStrings.TemplateSourceExplanation, $"[yellow]{SharedCommandStrings.SourceTrustWarning}[/]"], 299message => Assert.Equal(NewCommandStrings.TemplateSourceExplanation, message.Message), 305NewCommandStrings.TemplateSourceSearchFailed, "missing", ""), message.Message); 311NewCommandStrings.TemplateSourceSearchFailed, "empty", ""), message.Message); 378Assert.Equal(new SelectionChoiceGroup("builtin", NewCommandStrings.BuiltInTemplates), choice.Group)); 411Assert.Equal([NewCommandStrings.TemplateSourceExplanation, $"[yellow]{SharedCommandStrings.SourceTrustWarning}[/]"],
Commands\NewCommandLocalTemplateTests.cs (16)
1046string.Format(CultureInfo.CurrentCulture, NewCommandStrings.NoChannelFoundMatching, "pr-missing", "default"), 1090string.Format(CultureInfo.CurrentCulture, NewCommandStrings.LocalTemplateLoadFailed, 1091NewCommandStrings.SourceWithCredentialsCannotBePersisted), 1154string.Format(CultureInfo.CurrentCulture, NewCommandStrings.NoChannelFoundMatching, "pr-missing", "default"), 1199Assert.Equal(string.Format(NewCommandStrings.LocalTemplateCreationFailed, "MissingMandatoryParam", "Greeting"), Assert.Single(interaction.DisplayedErrors)); 1249Assert.Equal(NewCommandStrings.TemplatePathConflictingOptions, Assert.Single(interaction.DisplayedErrors)); 1302Assert.Equal(NewCommandStrings.LocalTemplateSelectionRequiresInteraction, Assert.Single(interaction.DisplayedErrors)); 1319Assert.Equal(NewCommandStrings.TemplatePathOptionDescription, Assert.Single(newCommand.Options, option => option.Name == "--template-path").Description); 15110 => string.Format(NewCommandStrings.TemplateRepositoryGitExited, 128, ErrorStrings.GitRepositoryUnavailable), 15132 => string.Format(NewCommandStrings.TemplateRepositoryGitExited, 128, ErrorStrings.GitAuthenticationFailed), 1544Assert.Equal(NewCommandStrings.TemplateRepositoryPathInvalid, Assert.Single(interaction.DisplayedErrors)); 1584Assert.Equal(NewCommandStrings.TemplateRepositoryPathInvalid, Assert.Single(interaction.DisplayedErrors)); 1883Assert.Equal(string.Format(NewCommandStrings.TemplateRepositoryRefNotFound, "missing"), exception.Message); 1907Assert.Equal(NewCommandStrings.TemplateRepositoryRefRequiresRepository, Assert.Single(interaction.DisplayedErrors)); 1928Assert.Equal(NewCommandStrings.TemplatePathConflictingOptions, Assert.Single(interaction.DisplayedErrors)); 1947Assert.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); 1493Assert.Contains(NewCommandStrings.SourceWithCredentialsCannotBePersisted, interactionService!.DisplayedErrors); 2568e => string.Equals(e, NewCommandStrings.NonInteractiveTemplateRequired, StringComparison.Ordinal)); 3229NewCommandStrings.OutputDirectoryNotEmptyInteractive, 3609var expectedError = string.Format(CultureInfo.CurrentCulture, NewCommandStrings.OutputDirectoryNotEmptyNonInteractive, existingDir.FullName); 3691var expectedError = string.Format(CultureInfo.CurrentCulture, NewCommandStrings.OutputPathContainsInvalidCharacters, invalidPath); 3748var expectedMessage = string.Format(CultureInfo.CurrentCulture, NewCommandStrings.OutputPathContainsInvalidCharacters, invalidPath);
Commands\TemplateSourceStartupTests.cs (1)
210"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);