44 references to WithArgument
Microsoft.TemplateEngine.Cli (39)
Commands\BaseCommand.cs (1)
97
Reporter.Output.WriteCommand(Example.For<InstantiateCommand>(args.ParseResult).
WithArgument
(InstantiateCommand.ShortNameArgument, usedCommandAlias));
Commands\create\InstantiateCommand.cs (4)
474
? Example.For<InstantiateCommand>(instantiateArgs.ParseResult).
WithArgument
(ShortNameArgument, possibleMatch)
475
: Example.For<NewCommand>(instantiateArgs.ParseResult).
WithArgument
(NewCommand.ShortNameArgument, possibleMatch);
520
.
WithArgument
(BaseListCommand.NameArgument, instantiateArgs.ShortName));
541
.
WithArgument
(BaseSearchCommand.NameArgument, instantiateArgs.ShortName));
Commands\create\InstantiateCommand.Help.cs (2)
219
.
WithArgument
(NewCommand.ShortNameArgument, templateGroup.ShortNames[0])
254
.
WithArgument
(NewCommand.ShortNameArgument, templateGroup.ShortNames[0])
Commands\create\InstantiateCommand.NoMatchHandling.cs (1)
156
.
WithArgument
(NewCommand.ShortNameArgument, templateGroup.ShortNames[0]);
TemplateInvoker.cs (3)
256
Reporter.Output.WriteCommand(Example.For<UninstallCommand>(templateArgs.ParseResult).
WithArgument
(BaseUninstallCommand.NameArgument, templatePackage.DisplayName));
259
Reporter.Output.WriteCommand(Example.For<InstallCommand>(templateArgs.ParseResult).
WithArgument
(BaseInstallCommand.NameArgument, templatePackage.DisplayName));
271
.
WithArgument
(NewCommand.ShortNameArgument, templateArgs.Template.ShortNameList[0])
TemplateListCoordinator.cs (6)
80
.
WithArgument
(BaseSearchCommand.NameArgument));
125
.
WithArgument
(BaseSearchCommand.NameArgument));
133
.
WithArgument
(BaseSearchCommand.NameArgument, args.ListNameCriteria));
167
.
WithArgument
(NewCommand.ShortNameArgument, "console"));
175
.
WithArgument
(NewCommand.ShortNameArgument, "console")
190
.
WithArgument
(BaseSearchCommand.NameArgument, "web"));
TemplatePackageCoordinator.cs (9)
156
.
WithArgument
(BaseInstallCommand.NameArgument, $"{versionCheckResult.TemplatePackage?.Identifier}::{versionCheckResult.LatestVersion}"));
175
.
WithArgument
(BaseUninstallCommand.NameArgument, packageId));
646
.
WithArgument
(BaseInstallCommand.NameArgument, installRequests.Select(ir => ir.DisplayName).ToArray())
747
.
WithArgument
(BaseUninstallCommand.NameArgument));
755
.
WithArgument
(BaseUninstallCommand.NameArgument, managedPackages.First().Identifier));
847
.
WithArgument
(BaseInstallCommand.NameArgument, $"<package>::<version>"));
852
.
WithArgument
(BaseInstallCommand.NameArgument, $"{displayableResults.First().Identifier}::{displayableResults.First().LatestVersion}"));
924
.
WithArgument
(BaseUninstallCommand.NameArgument, managedSource.Identifier),
1007
Reporter.Error.WriteCommand(Example.For<InstallCommand>(parseResult).
WithArgument
(BaseInstallCommand.NameArgument, packageToInstall).WithOption(BaseInstallCommand.ForceOption));
TemplatePackageDisplay.cs (9)
58
.
WithArgument
(BaseInstallCommand.NameArgument, $"{versionCheckResult.TemplatePackage?.Identifier}::{versionCheckResult.LatestVersion}"));
77
.
WithArgument
(BaseUninstallCommand.NameArgument, packageId));
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));
201
_reporterError.WriteCommand(Example.For<UninstallCommand>(parseResult).
WithArgument
(BaseUninstallCommand.NameArgument, packageToInstall));
202
_reporterError.WriteCommand(Example.For<InstallCommand>(parseResult).
WithArgument
(BaseInstallCommand.NameArgument, packageToInstall).WithOption(BaseInstallCommand.ForceOption));
270
.
WithArgument
(BaseUninstallCommand.NameArgument, managedSource.Identifier),
306
.
WithArgument
(BaseInstallCommand.NameArgument, $"<package>::<version>"));
311
.
WithArgument
(BaseInstallCommand.NameArgument, $"{displayableResults.First().Identifier}::{displayableResults.First().LatestVersion}"));
TemplateSearch\CliTemplateSearchCoordinator.cs (4)
98
.
WithArgument
(BaseInstallCommand.NameArgument));
104
.
WithArgument
(BaseInstallCommand.NameArgument, packageIdToShow));
262
.
WithArgument
(BaseSearchCommand.NameArgument, "web"));
274
.
WithArgument
(BaseSearchCommand.NameArgument, "web")
Microsoft.TemplateEngine.Cli.UnitTests (5)
ParserTests\InstallTests.cs (1)
238
Assert.Equal("dotnet new install my-source", Example.For<NewCommand>(parseResult).WithSubcommand<InstallCommand>().
WithArgument
(BaseInstallCommand.NameArgument, "my-source"));
ParserTests\SearchTests.cs (3)
253
Assert.Equal("dotnet new search my-template", Example.For<NewCommand>(parseResult).WithSubcommand<SearchCommand>().
WithArgument
(BaseSearchCommand.NameArgument, "my-template"));
267
Assert.Equal("dotnet new search [<template-name>]", Example.For<NewCommand>(parseResult).WithSubcommand<SearchCommand>().
WithArgument
(BaseSearchCommand.NameArgument));
281
Assert.Equal("dotnet new search [<template-name>] --author Microsoft", Example.For<NewCommand>(parseResult).WithSubcommand<SearchCommand>().
WithArgument
(BaseSearchCommand.NameArgument).WithOption(SharedOptionsFactory.CreateAuthorOption(), "Microsoft"));
ParserTests\UninstallTests.cs (1)
99
Assert.Equal("dotnet new uninstall my-source", Example.For<NewCommand>(parseResult).WithSubcommand<UninstallCommand>().
WithArgument
(BaseUninstallCommand.NameArgument, "my-source"));