15 references to WithOption
Microsoft.TemplateEngine.Cli (14)
Commands\BaseCommand.cs (1)
108
newCommandExample.
WithOption
(additionalOption);
Commands\create\InstantiateCommand.Help.cs (2)
221
.
WithOption
(SharedOptionsFactory.CreateLanguageOption(), supportedLanguages.First())
256
.
WithOption
(SharedOptionsFactory.CreateTypeOption(), supportedTypes.First())
Commands\create\InstantiateCommand.NoMatchHandling.cs (1)
160
example.
WithOption
(language.Option, language.GetValueOrDefault<string>()!);
Commands\create\TemplateCommand.cs (1)
243
reporter.WriteCommand(Example.FromExistingTokens(templateArgs.ParseResult).
WithOption
(SharedOptions.ForceOption));
TemplateInvoker.cs (2)
240
Reporter.Output.WriteCommand(Example.For<NewCommand>(templateArgs.ParseResult).
WithOption
(NewCommand.DebugRebuildCacheOption));
292
Reporter.Error.WriteCommand(Example.FromExistingTokens(templateArgs.ParseResult).
WithOption
(SharedOptions.ForceOption));
TemplatePackageCoordinator.cs (2)
647
.
WithOption
(SharedOptions.ForceOption));
1007
Reporter.Error.WriteCommand(Example.For<InstallCommand>(parseResult).WithArgument(BaseInstallCommand.NameArgument, packageToInstall).
WithOption
(BaseInstallCommand.ForceOption));
TemplatePackageDisplay.cs (3)
160
_reporterError.WriteCommand(Example.For<InstallCommand>(parseResult).WithArgument(BaseInstallCommand.NameArgument, packageToInstall).
WithOption
(BaseInstallCommand.ForceOption));
189
_reporterError.WriteCommand(Example.For<InstallCommand>(parseResult).WithArgument(BaseInstallCommand.NameArgument, packageToInstall).
WithOption
(BaseInstallCommand.ForceOption));
202
_reporterError.WriteCommand(Example.For<InstallCommand>(parseResult).WithArgument(BaseInstallCommand.NameArgument, packageToInstall).
WithOption
(BaseInstallCommand.ForceOption));
TemplateSearch\CliTemplateSearchCoordinator.cs (2)
268
.
WithOption
(SharedOptionsFactory.CreateAuthorOption(), "Microsoft"));
275
.
WithOption
(SharedOptionsFactory.CreateLanguageOption(), "C#"));
Microsoft.TemplateEngine.Cli.UnitTests (1)
ParserTests\SearchTests.cs (1)
281
Assert.Equal("dotnet new search [<template-name>] --author Microsoft", Example.For<NewCommand>(parseResult).WithSubcommand<SearchCommand>().WithArgument(BaseSearchCommand.NameArgument).
WithOption
(SharedOptionsFactory.CreateAuthorOption(), "Microsoft"));