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