20 references to NameArgument
Microsoft.TemplateEngine.Cli (19)
Commands\install\BaseInstallCommand.cs (1)
19Arguments.Add(NameArgument);
Commands\install\InstallCommandArgs.cs (4)
12var nameResult = parseResult.GetResult(BaseInstallCommand.NameArgument); 15throw new ArgumentException($"{nameof(parseResult)} should contain at least one argument for {nameof(BaseInstallCommand.NameArgument)}", nameof(parseResult)); 18TemplatePackages = parseResult.GetValue(BaseInstallCommand.NameArgument)!; 28throw new ArgumentException($"{nameof(parseResult)} should contain at least one argument for {nameof(BaseInstallCommand.NameArgument)}", nameof(parseResult));
TemplateInvoker.cs (1)
259Reporter.Output.WriteCommand(Example.For<InstallCommand>(templateArgs.ParseResult).WithArgument(BaseInstallCommand.NameArgument, templatePackage.DisplayName));
TemplatePackageCoordinator.cs (5)
156.WithArgument(BaseInstallCommand.NameArgument, $"{versionCheckResult.TemplatePackage?.Identifier}::{versionCheckResult.LatestVersion}")); 646.WithArgument(BaseInstallCommand.NameArgument, installRequests.Select(ir => ir.DisplayName).ToArray()) 847.WithArgument(BaseInstallCommand.NameArgument, $"<package>::<version>")); 852.WithArgument(BaseInstallCommand.NameArgument, $"{displayableResults.First().Identifier}::{displayableResults.First().LatestVersion}")); 1007Reporter.Error.WriteCommand(Example.For<InstallCommand>(parseResult).WithArgument(BaseInstallCommand.NameArgument, packageToInstall).WithOption(BaseInstallCommand.ForceOption));
TemplatePackageDisplay.cs (6)
58.WithArgument(BaseInstallCommand.NameArgument, $"{versionCheckResult.TemplatePackage?.Identifier}::{versionCheckResult.LatestVersion}")); 160_reporterError.WriteCommand(Example.For<InstallCommand>(parseResult).WithArgument(BaseInstallCommand.NameArgument, packageToInstall).WithOption(BaseInstallCommand.ForceOption)); 189_reporterError.WriteCommand(Example.For<InstallCommand>(parseResult).WithArgument(BaseInstallCommand.NameArgument, packageToInstall).WithOption(BaseInstallCommand.ForceOption)); 202_reporterError.WriteCommand(Example.For<InstallCommand>(parseResult).WithArgument(BaseInstallCommand.NameArgument, packageToInstall).WithOption(BaseInstallCommand.ForceOption)); 306.WithArgument(BaseInstallCommand.NameArgument, $"<package>::<version>")); 311.WithArgument(BaseInstallCommand.NameArgument, $"{displayableResults.First().Identifier}::{displayableResults.First().LatestVersion}"));
TemplateSearch\CliTemplateSearchCoordinator.cs (2)
98.WithArgument(BaseInstallCommand.NameArgument)); 104.WithArgument(BaseInstallCommand.NameArgument, packageIdToShow));
Microsoft.TemplateEngine.Cli.UnitTests (1)
ParserTests\InstallTests.cs (1)
238Assert.Equal("dotnet new install my-source", Example.For<NewCommand>(parseResult).WithSubcommand<InstallCommand>().WithArgument(BaseInstallCommand.NameArgument, "my-source"));