20 references to NameArgument
Microsoft.TemplateEngine.Cli (19)
Commands\install\BaseInstallCommand.cs (1)
19
Arguments.Add(
NameArgument
);
Commands\install\InstallCommandArgs.cs (4)
12
var nameResult = parseResult.GetResult(BaseInstallCommand.
NameArgument
);
15
throw new ArgumentException($"{nameof(parseResult)} should contain at least one argument for {nameof(BaseInstallCommand.
NameArgument
)}", nameof(parseResult));
18
TemplatePackages = parseResult.GetValue(BaseInstallCommand.
NameArgument
)!;
28
throw new ArgumentException($"{nameof(parseResult)} should contain at least one argument for {nameof(BaseInstallCommand.
NameArgument
)}", nameof(parseResult));
TemplateInvoker.cs (1)
259
Reporter.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}"));
1007
Reporter.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)
238
Assert.Equal("dotnet new install my-source", Example.For<NewCommand>(parseResult).WithSubcommand<InstallCommand>().WithArgument(BaseInstallCommand.
NameArgument
, "my-source"));