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); 472Example 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) 467if (command is NewCommand)
Commands\create\InstantiateCommand.NoMatchHandling.cs (1)
156.For<NewCommand>(args.ParseResult)
Commands\create\InstantiateCommandArgs.cs (1)
57Debug.Assert(parseResult.CommandResult.Command is NewCommand);
Commands\create\TemplateCommandArgs.cs (6)
85public NewCommand RootCommand { get; } 126private NewCommand GetRootCommand(Command command) 128if (command is NewCommand newCommand) 133while (currentCommand != null && currentCommand is not NewCommand) 137return currentCommand as NewCommand ?? throw new Exception($"Command structure is not correct: {nameof(NewCommand)} is not found.");
Commands\GlobalArgs.cs (6)
28public NewCommand RootCommand { get; } 52/// Gets root <see cref="NewCommand"/> from <paramref name="parseResult"/>. 54private static NewCommand GetNewCommandFromParseResult(ParseResult parseResult) 58while (commandResult?.Command != null && commandResult.Command is not NewCommand) 62if (commandResult == null || commandResult.Command is not NewCommand newCommand) 64throw 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"/>. 14internal NewCommand RootCommand { get; }
Commands\list\ListCommandArgs.cs (2)
22var newCommand = (NewCommand)command.Parents.Single();
Commands\NewCommand.Help.cs (2)
15if (context.ParseResult.CommandResult.Command is not NewCommand newCommand) 17throw new ArgumentException($"{nameof(context)} should be for {nameof(NewCommand)}");
Commands\NewCommandArgs.cs (1)
21public NewCommandArgs(NewCommand command, ParseResult parseResult)
Commands\search\SearchCommandArgs.cs (2)
22var newCommand = (NewCommand)command.Parents.Single();
TemplateInvoker.cs (2)
242Reporter.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) 153Reporter.Output.WriteLine(LocalizableStrings.TemplateInformationCoordinator_DotnetNew_Description, Example.For<NewCommand>(args.ParseResult)); 157Reporter.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)