164 references to NewCommand
aspire (10)
Commands\InitCommand.cs (2)
118Options.Add(NewCommand.s_suppressAgentInitOption); 208var agentInitBinding = PromptBinding.CreateInvertedBoolConfirm(parseResult, NewCommand.s_suppressAgentInitOption, defaultValue: true);
Commands\NewCommand.cs (5)
41private readonly ILogger<NewCommand> _logger; 104_logger = services.LoggerFactory.CreateLogger<NewCommand>(); 1027binding: PromptBinding.Create(parseResult, NewCommand.s_outputOption, path), 1040binding: PromptBinding.Create(parseResult, NewCommand.s_nameOption, defaultName), 1052t => NewCommand.FormatTemplateDisplayLabel(t).EscapeMarkup(),
Commands\RootCommand.cs (1)
191NewCommand newCommand,
Commands\TemplateCommand.cs (1)
31if (!string.IsNullOrWhiteSpace(parseResult.GetValue(NewCommand.s_sourceOption)))
Program.cs (1)
694builder.Services.AddTransient<NewCommand>();
Aspire.Cli.Tests (154)
Commands\NewCommandChannelResolutionTests.cs (10)
22/// Behavioral guard on <see cref="NewCommand"/>'s channel resolution. The command sources its 110var newCommand = serviceProvider.GetRequiredService<NewCommand>(); 170/// <see cref="NewCommand"/>. Pinned here so a future refactor doesn't regress the 361/// <c>--channel</c> is supplied, <see cref="NewCommand"/> must forward the running CLI's 462/// <see cref="NewCommand"/> must NOT blindly forward the unrecognized identity into 528/// Invokes <see cref="NewCommand"/> with a fake template that captures the 601var newCommand = serviceProvider.GetRequiredService<NewCommand>(); 764/// <see cref="NewCommand"/> registers it as the only subcommand and tests can drive
Commands\NewCommandLocalTemplateTests.cs (2)
1318var newCommand = provider.GetRequiredService<NewCommand>();
Commands\NewCommandTemplateConfigPersistenceTests.cs (11)
23/// persists into <c>aspire.config.json</c>. Drives <see cref="NewCommand"/> end-to-end 41/// the value is persisted iff <see cref="NewCommand"/> resolved one (Explicit 57/// <see cref="NewCommand"/> hands to template factories via <c>TemplateInputs.Channel</c>), 109/// Templates that pin <c>aspire.config.json#channel</c> when <see cref="NewCommand"/> 142/// <see cref="NewCommand"/> resolves it and every channel-pinning template persists 195/// <c>staging</c> channel for a staging-identity CLI. Once <see cref="NewCommand"/> 304var newCommand = serviceProvider.GetRequiredService<NewCommand>(); 427/// Drives <c>aspire new &lt;templateId&gt;</c> against the real <see cref="NewCommand"/>, 470var newCommand = serviceProvider.GetRequiredService<NewCommand>();
Commands\NewCommandTests.cs (115)
97var command = provider.GetRequiredService<NewCommand>(); 114var command = provider.GetRequiredService<NewCommand>(); 129var command = provider.GetRequiredService<NewCommand>(); 202var command = provider.GetRequiredService<NewCommand>(); 226var command = provider.GetRequiredService<NewCommand>(); 315var command = provider.GetRequiredService<NewCommand>(); 347var command = provider.GetRequiredService<NewCommand>(); 425var command = provider.GetRequiredService<NewCommand>(); 502var command = provider.GetRequiredService<NewCommand>(); 579var command = provider.GetRequiredService<NewCommand>(); 618var command = provider.GetRequiredService<NewCommand>(); 650var command = provider.GetRequiredService<NewCommand>(); 686var command = provider.GetRequiredService<NewCommand>(); 824var command = provider.GetRequiredService<NewCommand>(); 946var command = provider.GetRequiredService<NewCommand>(); 1003var command = provider.GetRequiredService<NewCommand>(); 1024var command = provider.GetRequiredService<NewCommand>(); 1068var command = provider.GetRequiredService<NewCommand>(); 1103var command = provider.GetRequiredService<NewCommand>(); 1164var command = provider.GetRequiredService<NewCommand>(); 1227var command = provider.GetRequiredService<NewCommand>(); 1255var command = provider.GetRequiredService<NewCommand>(); 1325var command = provider.GetRequiredService<NewCommand>(); 1370var command = provider.GetRequiredService<NewCommand>(); 1423var command = provider.GetRequiredService<NewCommand>(); 1449var command = provider.GetRequiredService<NewCommand>(); 1484var command = provider.GetRequiredService<NewCommand>(); 1518var command = provider.GetRequiredService<NewCommand>(); 1552var command = provider.GetRequiredService<NewCommand>(); 1591var command = provider.GetRequiredService<NewCommand>(); 1627var command = provider.GetRequiredService<NewCommand>(); 1655var command = provider.GetRequiredService<NewCommand>(); 1672var command = provider.GetRequiredService<NewCommand>(); 1701var command = provider.GetRequiredService<NewCommand>(); 1739var command = provider.GetRequiredService<NewCommand>(); 1773var command = provider.GetRequiredService<NewCommand>(); 1807var command = provider.GetRequiredService<NewCommand>(); 1881var command = provider.GetRequiredService<NewCommand>(); 2089var command = provider.GetRequiredService<NewCommand>(); 2432var command = provider.GetRequiredService<NewCommand>(); 2457var command = provider.GetRequiredService<NewCommand>(); 2482var command = provider.GetRequiredService<NewCommand>(); 2518var command = provider.GetRequiredService<NewCommand>(); 2560var command = provider.GetRequiredService<NewCommand>(); 2607var command = provider.GetRequiredService<NewCommand>(); 2652var command = provider.GetRequiredService<NewCommand>(); 2695var command = provider.GetRequiredService<NewCommand>(); 2743var command = provider.GetRequiredService<NewCommand>(); 2782var command = provider.GetRequiredService<NewCommand>(); 3454var command = provider.GetRequiredService<NewCommand>(); 3484var command = provider.GetRequiredService<NewCommand>(); 3511var command = provider.GetRequiredService<NewCommand>(); 3540var command = provider.GetRequiredService<NewCommand>(); 3568var result = provider.GetRequiredService<NewCommand>().Parse( 3603var command = provider.GetRequiredService<NewCommand>(); 3625var command = provider.GetRequiredService<NewCommand>(); 3685var command = provider.GetRequiredService<NewCommand>(); 3731var command = provider.GetRequiredService<NewCommand>();
Interaction\ConsoleInteractionServiceTests.cs (8)
19using NewCommand = Aspire.Cli.Commands.NewCommand; 448template => NewCommand.FormatTemplateDisplayLabel(template).EscapeMarkup()); 489template => NewCommand.FormatTemplateDisplayLabel(template).EscapeMarkup()); 514_ => NewCommand.CreateTemplateSourceGroup(configured), 515item => NewCommand.FormatTemplateDisplayLabel(item).EscapeMarkup()); 533_ => new SelectionChoiceGroup("source", "Company"), template => NewCommand.FormatTemplateDisplayLabel(template).EscapeMarkup()); 552template => NewCommand.FormatTemplateDisplayLabel(template).EscapeMarkup()); 567Assert.Equal(expectedLabel, NewCommand.FormatTemplateDisplayLabel(template));
NuGet\NuGetPackagePrefetcherTests.cs (5)
224[InlineData(typeof(NewCommand), true, true)] 274var newCommand = provider.GetRequiredService<NewCommand>(); 289var newCommand = provider.GetRequiredService<NewCommand>();
Templating\JavaStarterScaffoldTests.cs (2)
140var newCommand = serviceProvider.GetRequiredService<NewCommand>();
Utils\CliTestHelper.cs (1)
292services.AddTransient<NewCommand>();