1 instantiation of NewCommand
Microsoft.TemplateEngine.Cli (1)
NewCommandFactory.cs (1)
13
=> new
NewCommand
(hostBuilder, definition);
59 references to NewCommand
Microsoft.TemplateEngine.Cli (59)
Commands\create\InstantiateCommand.cs (5)
446
: Example.For<
NewCommand
>(instantiateArgs.ParseResult).WithArguments(possibleMatch);
472
Example example = Example.For<
NewCommand
>(instantiateArgs.ParseResult).WithSubcommand(possibleMatch);
489
.For<
NewCommand
>(instantiateArgs.ParseResult)
498
.For<
NewCommand
>(instantiateArgs.ParseResult)
510
.For<
NewCommand
>(instantiateArgs.ParseResult)
Commands\create\InstantiateCommand.Help.cs (3)
219
.For<
NewCommand
>(args.ParseResult)
254
.For<
NewCommand
>(args.ParseResult)
467
if (command is
NewCommand
)
Commands\create\InstantiateCommand.NoMatchHandling.cs (1)
156
.For<
NewCommand
>(args.ParseResult)
Commands\create\InstantiateCommandArgs.cs (1)
57
Debug.Assert(parseResult.CommandResult.Command is
NewCommand
);
Commands\create\TemplateCommandArgs.cs (6)
85
public
NewCommand
RootCommand { get; }
126
private
NewCommand
GetRootCommand(Command command)
128
if (command is
NewCommand
newCommand)
133
while (currentCommand != null && currentCommand is not
NewCommand
)
137
return currentCommand as
NewCommand
?? throw new Exception($"Command structure is not correct: {nameof(
NewCommand
)} is not found.");
Commands\GlobalArgs.cs (6)
28
public
NewCommand
RootCommand { get; }
52
/// Gets root <see cref="
NewCommand
"/> from <paramref name="parseResult"/>.
54
private static
NewCommand
GetNewCommandFromParseResult(ParseResult parseResult)
58
while (commandResult?.Command != null && commandResult.Command is not
NewCommand
)
62
if (commandResult == null || commandResult.Command is not
NewCommand
newCommand)
64
throw new Exception($"Command structure is not correct: {nameof(
NewCommand
)} is not found as part of parse result.");
Commands\ICommandArgs.cs (2)
11
/// Gets the topmost parent <see cref="
NewCommand
"/>.
14
internal
NewCommand
RootCommand { get; }
Commands\list\ListCommandArgs.cs (2)
22
var
newCommand = (
NewCommand
)command.Parents.Single();
Commands\NewCommand.Help.cs (2)
15
if (context.ParseResult.CommandResult.Command is not
NewCommand
newCommand)
17
throw new ArgumentException($"{nameof(context)} should be for {nameof(
NewCommand
)}");
Commands\NewCommandArgs.cs (1)
21
public NewCommandArgs(
NewCommand
command, ParseResult parseResult)
Commands\search\SearchCommandArgs.cs (2)
22
var
newCommand = (
NewCommand
)command.Parents.Single();
TemplateInvoker.cs (2)
242
Reporter.Output.WriteCommand(Example.For<
NewCommand
>(templateArgs.ParseResult).WithOption(c => c.Definition.DebugRebuildCacheOption));
272
.For<
NewCommand
>(templateArgs.ParseResult)
TemplateListCoordinator.cs (9)
79
.For<
NewCommand
>(args.ParseResult)
124
.For<
NewCommand
>(args.ParseResult)
132
.For<
NewCommand
>(args.ParseResult)
153
Reporter.Output.WriteLine(LocalizableStrings.TemplateInformationCoordinator_DotnetNew_Description, Example.For<
NewCommand
>(args.ParseResult));
157
Reporter.Output.WriteLine(LocalizableStrings.TemplateInformationCoordinator_DotnetNew_TemplatesHeader, Example.For<
NewCommand
>(args.ParseResult));
167
.For<
NewCommand
>(args.ParseResult)
175
.For<
NewCommand
>(args.ParseResult)
183
.For<
NewCommand
>(args.ParseResult)
189
.For<
NewCommand
>(args.ParseResult)
TemplatePackageCoordinator.cs (6)
151
.For<
NewCommand
>(args.ParseResult)
170
.For<
NewCommand
>(args.ParseResult)
742
.For<
NewCommand
>(commandArgs.ParseResult)
750
.For<
NewCommand
>(commandArgs.ParseResult)
760
.For<
NewCommand
>(commandArgs.ParseResult)
769
.For<
NewCommand
>(commandArgs.ParseResult)
TemplatePackageDisplay.cs (6)
57
.For<
NewCommand
>(args.ParseResult)
76
.For<
NewCommand
>(args.ParseResult)
269
.For<
NewCommand
>(args.ParseResult)
305
.For<
NewCommand
>(args.ParseResult)
310
.For<
NewCommand
>(args.ParseResult)
317
.For<
NewCommand
>(args.ParseResult)
TemplateSearch\CliTemplateSearchCoordinator.cs (5)
97
.For<
NewCommand
>(commandArgs.ParseResult)
103
.For<
NewCommand
>(commandArgs.ParseResult)
261
.For<
NewCommand
>(commandArgs.ParseResult)
267
.For<
NewCommand
>(commandArgs.ParseResult)
273
.For<
NewCommand
>(commandArgs.ParseResult)