60 references to For
Microsoft.TemplateEngine.Cli (53)
Commands\BaseCommand.cs (4)
97
Reporter.Output.WriteCommand(Example.
For
<InstantiateCommand>(args.ParseResult).WithArgument(InstantiateCommand.ShortNameArgument, usedCommandAlias));
105
var newCommandExample = Example.
For
<TNew>(parseResult);
113
Example.
For
<TDepr>(parseResult),
117
Reporter.Output.WriteCommand(Example.
For
<TNew>(parseResult).WithHelpOption().ToString().Yellow());
Commands\create\InstantiateCommand.cs (6)
474
? Example.
For
<InstantiateCommand>(instantiateArgs.ParseResult).WithArgument(ShortNameArgument, possibleMatch)
475
: Example.
For
<NewCommand>(instantiateArgs.ParseResult).WithArgument(NewCommand.ShortNameArgument, possibleMatch);
501
Example example = Example.
For
<NewCommand>(instantiateArgs.ParseResult).WithSubcommand(possibleMatch);
518
.
For
<NewCommand>(instantiateArgs.ParseResult)
527
.
For
<NewCommand>(instantiateArgs.ParseResult)
539
.
For
<NewCommand>(instantiateArgs.ParseResult)
Commands\create\InstantiateCommand.Help.cs (2)
218
.
For
<NewCommand>(args.ParseResult)
253
.
For
<NewCommand>(args.ParseResult)
Commands\create\InstantiateCommand.NoMatchHandling.cs (1)
155
.
For
<NewCommand>(args.ParseResult)
TemplateInvoker.cs (4)
240
Reporter.Output.WriteCommand(Example.
For
<NewCommand>(templateArgs.ParseResult).WithOption(NewCommand.DebugRebuildCacheOption));
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));
270
.
For
<NewCommand>(templateArgs.ParseResult)
TemplateListCoordinator.cs (9)
78
.
For
<NewCommand>(args.ParseResult)
123
.
For
<NewCommand>(args.ParseResult)
131
.
For
<NewCommand>(args.ParseResult)
152
Reporter.Output.WriteLine(LocalizableStrings.TemplateInformationCoordinator_DotnetNew_Description, Example.
For
<NewCommand>(args.ParseResult));
156
Reporter.Output.WriteLine(LocalizableStrings.TemplateInformationCoordinator_DotnetNew_TemplatesHeader, Example.
For
<NewCommand>(args.ParseResult));
166
.
For
<NewCommand>(args.ParseResult)
174
.
For
<NewCommand>(args.ParseResult)
182
.
For
<NewCommand>(args.ParseResult)
188
.
For
<NewCommand>(args.ParseResult)
TemplatePackageCoordinator.cs (12)
154
.
For
<NewCommand>(args.ParseResult)
173
.
For
<NewCommand>(args.ParseResult)
645
.
For
<InstallCommand>(args.ParseResult)
745
.
For
<NewCommand>(commandArgs.ParseResult)
753
.
For
<NewCommand>(commandArgs.ParseResult)
763
.
For
<NewCommand>(commandArgs.ParseResult)
772
.
For
<NewCommand>(commandArgs.ParseResult)
845
.
For
<NewCommand>(args.ParseResult)
850
.
For
<NewCommand>(args.ParseResult)
857
.
For
<NewCommand>(args.ParseResult)
922
.
For
<NewCommand>(args.ParseResult)
1007
Reporter.Error.WriteCommand(Example.
For
<InstallCommand>(parseResult).WithArgument(BaseInstallCommand.NameArgument, packageToInstall).WithOption(BaseInstallCommand.ForceOption));
TemplatePackageDisplay.cs (10)
56
.
For
<NewCommand>(args.ParseResult)
75
.
For
<NewCommand>(args.ParseResult)
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));
268
.
For
<NewCommand>(args.ParseResult)
304
.
For
<NewCommand>(args.ParseResult)
309
.
For
<NewCommand>(args.ParseResult)
316
.
For
<NewCommand>(args.ParseResult)
TemplateSearch\CliTemplateSearchCoordinator.cs (5)
96
.
For
<NewCommand>(commandArgs.ParseResult)
102
.
For
<NewCommand>(commandArgs.ParseResult)
260
.
For
<NewCommand>(commandArgs.ParseResult)
266
.
For
<NewCommand>(commandArgs.ParseResult)
272
.
For
<NewCommand>(commandArgs.ParseResult)
Microsoft.TemplateEngine.Cli.UnitTests (7)
ParserTests\InstallTests.cs (1)
238
Assert.Equal("dotnet new install my-source", Example.
For
<NewCommand>(parseResult).WithSubcommand<InstallCommand>().WithArgument(BaseInstallCommand.NameArgument, "my-source"));
ParserTests\ListTests.cs (1)
278
Assert.Equal("dotnet new list", Example.
For
<NewCommand>(parseResult).WithSubcommand<ListCommand>());
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"));
ParserTests\UpdateTests.cs (1)
197
Assert.Equal("dotnet new update", Example.
For
<NewCommand>(parseResult).WithSubcommand<UpdateCommand>());