1 instantiation of InstantiateCommand
Microsoft.TemplateEngine.Cli (1)
Commands\NewCommand.cs (1)
23Add(new InstantiateCommand(this, hostBuilder));
90 references to InstantiateCommand
Microsoft.TemplateEngine.Cli (10)
Commands\BaseCommand.cs (2)
97Reporter.Output.WriteCommand(Example.For<InstantiateCommand>(args.ParseResult).WithArgument(InstantiateCommand.ShortNameArgument, usedCommandAlias));
Commands\create\InstantiateCommand.cs (2)
464bool useInstantiateCommand = instantiateArgs.Command is InstantiateCommand; 474? Example.For<InstantiateCommand>(instantiateArgs.ParseResult).WithArgument(ShortNameArgument, possibleMatch)
Commands\create\InstantiateCommandArgs.cs (2)
11public InstantiateCommandArgs(InstantiateCommand command, ParseResult parseResult) : base(command, parseResult) 14ShortName = parseResult.GetValue(InstantiateCommand.ShortNameArgument);
Commands\NewCommand.cs (3)
135foreach (CompletionItem completion in InstantiateCommand.GetTemplateCompletions(instantiateCommandArgs, templateGroups, environmentSettings, templatePackageManager, textCompletionContext)) 142foreach (CompletionItem completion in InstantiateCommand.GetTemplateNameCompletions(instantiateCommandArgs.ShortName, templateGroups, environmentSettings)) 159return InstantiateCommand.ExecuteAsync(args, environmentSettings, templatePackageManager, parseResult, cancellationToken);
Commands\NewCommand.Help.cs (1)
22InstantiateCommand.WriteHelp(context, instantiateCommandArgs, environmentSettings);
Microsoft.TemplateEngine.Cli.UnitTests (80)
AliasAssignmentTests.cs (2)
268var templateCommands = InstantiateCommand.GetTemplateCommand(args, settings, A.Fake<TemplatePackageManager>(), templateGroup); 296var templateCommands = InstantiateCommand.GetTemplateCommand(args, settings, templatePackageManager, templateGroup);
ParserTests\HelpTests.cs (18)
62InstantiateCommand.ShowTemplateDetailHeaders(cliTemplateInfo, sw); 75InstantiateCommand.ShowUsage(myCommand, new[] { "short-name" }, helpContext); 88InstantiateCommand.ShowUsage(myCommand, new[] { "short-name1", "short-name2" }, helpContext); 111InstantiateCommand.ShowCommandOptions(new[] { templateCommand }, helpContext); 134InstantiateCommand.ShowCommandOptions(new[] { templateCommand }, helpContext); 157InstantiateCommand.ShowCommandOptions(new[] { templateCommand }, helpContext); 180InstantiateCommand.ShowTemplateSpecificOptions(new[] { templateCommand }, helpContext); 204InstantiateCommand.ShowTemplateSpecificOptions(new[] { templateCommand }, helpContext); 231InstantiateCommand.ShowTemplateSpecificOptions(new[] { templateCommand2, templateCommand1 }, helpContext); 255InstantiateCommand.ShowTemplateSpecificOptions(new[] { templateCommand }, helpContext); 284InstantiateCommand.ShowTemplateSpecificOptions(new[] { templateCommand2, templateCommand1 }, helpContext); 308InstantiateCommand.ShowTemplateSpecificOptions(new[] { templateCommand }, helpContext); 332InstantiateCommand.ShowTemplateSpecificOptions(new[] { templateCommand }, helpContext); 354InstantiateCommand.ShowHintForOtherTemplates(templateGroup, templateGroup.Templates[0], args, sw); 378InstantiateCommand.ShowTemplateSpecificOptions(new[] { templateCommand }, helpContext); 402InstantiateCommand.ShowTemplateSpecificOptions(new[] { templateCommand }, helpContext); 445InstantiateCommand.ShowTemplateSpecificOptions(new[] { templateCommand1, templateCommand2 }, helpContext); 469InstantiateCommand.ShowTemplateSpecificOptions(new[] { templateCommand }, helpContext);
ParserTests\HelpTests.Resolution.cs (18)
31IEnumerable<TemplateCommand> matchingTemplates = InstantiateCommand.GetMatchingTemplates(args, settings, A.Fake<TemplatePackageManager>(), templateGroup); 34Assert.True(InstantiateCommand.VerifyMatchingTemplates(settings, matchingTemplates, reporter, out _)); 56IEnumerable<TemplateCommand> matchingTemplates = InstantiateCommand.GetMatchingTemplates(args, settings, A.Fake<TemplatePackageManager>(), templateGroup); 60Assert.False(InstantiateCommand.VerifyMatchingTemplates(settings, matchingTemplates, reporter, out _)); 86IEnumerable<TemplateCommand> matchingTemplates = InstantiateCommand.GetMatchingTemplates(args, settings, A.Fake<TemplatePackageManager>(), templateGroup); 89Assert.True(InstantiateCommand.VerifyMatchingTemplates(settings, matchingTemplates, reporter, out IEnumerable<TemplateCommand>? filtered)); 116IEnumerable<TemplateCommand> matchingTemplates = InstantiateCommand.GetMatchingTemplates(args, settings, A.Fake<TemplatePackageManager>(), templateGroup); 119Assert.True(InstantiateCommand.VerifyMatchingTemplates(settings, matchingTemplates, reporter, out IEnumerable<TemplateCommand>? filtered)); 142IEnumerable<TemplateCommand> matchingTemplates = InstantiateCommand.GetMatchingTemplates(args, settings, A.Fake<TemplatePackageManager>(), templateGroup); 145Assert.True(InstantiateCommand.VerifyMatchingTemplates(settings, matchingTemplates, reporter, out IEnumerable<TemplateCommand>? filtered)); 169IEnumerable<TemplateCommand> matchingTemplates = InstantiateCommand.GetMatchingTemplates(args, settings, A.Fake<TemplatePackageManager>(), templateGroup); 192IEnumerable<TemplateCommand> matchingTemplates = InstantiateCommand.GetMatchingTemplates(args, settings, A.Fake<TemplatePackageManager>(), templateGroup); 215IEnumerable<TemplateCommand> matchingTemplates = InstantiateCommand.GetMatchingTemplates(args, settings, A.Fake<TemplatePackageManager>(), templateGroup); 238IEnumerable<TemplateCommand> matchingTemplates = InstantiateCommand.GetMatchingTemplates(args, settings, A.Fake<TemplatePackageManager>(), templateGroup); 266IEnumerable<TemplateCommand> matchingTemplates = InstantiateCommand.GetMatchingTemplates(args, settings, A.Fake<TemplatePackageManager>(), templateGroup); 301IEnumerable<TemplateCommand> matchingTemplates = InstantiateCommand.GetMatchingTemplates(args, settings, A.Fake<TemplatePackageManager>(), templateGroup); 336IEnumerable<TemplateCommand> matchingTemplates = InstantiateCommand.GetMatchingTemplates(args, settings, A.Fake<TemplatePackageManager>(), templateGroup); 372IEnumerable<TemplateCommand> matchingTemplates = InstantiateCommand.GetMatchingTemplates(args, settings, A.Fake<TemplatePackageManager>(), templateGroup);
ParserTests\InstantiateTests.cs (6)
229HashSet<TemplateCommand> templateCommands = InstantiateCommand.GetTemplateCommand(args, settings, A.Fake<TemplatePackageManager>(), templateGroup); 615HashSet<TemplateCommand> templateCommands = InstantiateCommand.GetTemplateCommand(args, settings, A.Fake<TemplatePackageManager>(), templateGroup); 644HashSet<TemplateCommand> templateCommands = InstantiateCommand.GetTemplateCommand(args, settings, A.Fake<TemplatePackageManager>(), templateGroup); 675HashSet<TemplateCommand> templateCommands = InstantiateCommand.GetTemplateCommand(args, settings, A.Fake<TemplatePackageManager>(), templateGroup); 705HashSet<TemplateCommand> templateCommands = InstantiateCommand.GetTemplateCommand(args, settings, A.Fake<TemplatePackageManager>(), templateGroup); 773HashSet<TemplateCommand> templateCommands = InstantiateCommand.GetTemplateCommand(args, settings, A.Fake<TemplatePackageManager>(), templateGroup);
ParserTests\InstantiateTests.NoMatchHandling.cs (3)
304HashSet<TemplateCommand> templateCommands = InstantiateCommand.GetTemplateCommand(args, settings, A.Fake<TemplatePackageManager>(), templateGroup); 307List<TemplateResult> templateMatchInfos = InstantiateCommand.CollectTemplateMatchInfo(args, settings, templatePackageManager, templateGroup); 308List<InvalidTemplateOptionResult> invalidOptions = InstantiateCommand.GetInvalidOptions(templateMatchInfos);
ParserTests\InstantiateTests.Subcommand.cs (17)
23InstantiateCommandArgs args = new((InstantiateCommand)parseResult.CommandResult.Command, parseResult); 52var instantiateCommand = (InstantiateCommand)parseResult.CommandResult.Command; 54HashSet<TemplateCommand> templateCommands = InstantiateCommand.GetTemplateCommand(args, settings, A.Fake<TemplatePackageManager>(), templateGroup); 83var instantiateCommand = (InstantiateCommand)parseResult.CommandResult.Command; 146var instantiateCommand = (InstantiateCommand)parseResult.CommandResult.Command; 181var instantiateCommand = (InstantiateCommand)parseResult.CommandResult.Command; 223var instantiateCommand = (InstantiateCommand)parseResult.CommandResult.Command; 257var instantiateCommand = (InstantiateCommand)parseResult.CommandResult.Command; 284var instantiateCommand = (InstantiateCommand)parseResult.CommandResult.Command; 286HashSet<TemplateCommand> templateCommands = InstantiateCommand.GetTemplateCommand(args, settings, A.Fake<TemplatePackageManager>(), templateGroup);
ParserTests\TabCompletionTests.cs (16)
125IEnumerable<string> result = InstantiateCommand.GetTemplateCompletions(args, templateGroups, settings, packageManager, completionContext!).Select(l => l.Label); 154IEnumerable<string> result = InstantiateCommand.GetTemplateCompletions(args, templateGroups, settings, packageManager, completionContext!).Select(l => l.Label); 178IEnumerable<string> result = InstantiateCommand.GetTemplateCompletions(args, templateGroups, settings, packageManager, completionContext!).Select(l => l.Label); 203IEnumerable<string> result = InstantiateCommand.GetTemplateCompletions(args, templateGroups, settings, packageManager, completionContext!).Select(l => l.Label); 230IEnumerable<string> result = InstantiateCommand.GetTemplateCompletions(args, templateGroups, settings, packageManager, completionContext!).Select(l => l.Label); 257IEnumerable<string> result = InstantiateCommand.GetTemplateCompletions(args, templateGroups, settings, packageManager, completionContext!).Select(l => l.Label); 286IEnumerable<string> result = InstantiateCommand.GetTemplateCompletions(args, templateGroups, settings, packageManager, completionContext!).Select(l => l.Label); 327IEnumerable<string> result = InstantiateCommand.GetTemplateCompletions(args, templateGroups, settings, packageManager, completionContext!).Select(l => l.Label); 370IEnumerable<string> result = InstantiateCommand.GetTemplateCompletions(args, templateGroups, settings, packageManager, completionContext!).Select(l => l.Label); 411IEnumerable<string> result = InstantiateCommand.GetTemplateCompletions(args, templateGroups, settings, packageManager, completionContext!).Select(l => l.Label); 438IEnumerable<string> result = InstantiateCommand.GetTemplateCompletions(args, templateGroups, settings, packageManager, completionContext!).Select(l => l.Label); 469IEnumerable<string> result = InstantiateCommand.GetTemplateNameCompletions(args.ShortName, templateGroups, settings).Select(l => l.Label); 499IEnumerable<string> result = InstantiateCommand.GetTemplateNameCompletions(args.ShortName, templateGroups, settings).Select(l => l.Label); 532IEnumerable<string> result = InstantiateCommand.GetTemplateCompletions(args, templateGroups, settings, packageManager, completionContext!).Select(l => l.Label); 567IEnumerable<string> result = InstantiateCommand.GetTemplateCompletions(args, templateGroups, settings, packageManager, completionContext!).Select(l => l.Label); 601IEnumerable<string> result = InstantiateCommand.GetTemplateNameCompletions(args.ShortName, templateGroups, settings).Select(l => l.Label);