15 references to WithOption
Microsoft.TemplateEngine.Cli (14)
Commands\BaseCommand.cs (1)
108newCommandExample.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)
160example.WithOption(language.Option, language.GetValueOrDefault<string>()!);
Commands\create\TemplateCommand.cs (1)
243reporter.WriteCommand(Example.FromExistingTokens(templateArgs.ParseResult).WithOption(SharedOptions.ForceOption));
TemplateInvoker.cs (2)
240Reporter.Output.WriteCommand(Example.For<NewCommand>(templateArgs.ParseResult).WithOption(NewCommand.DebugRebuildCacheOption)); 292Reporter.Error.WriteCommand(Example.FromExistingTokens(templateArgs.ParseResult).WithOption(SharedOptions.ForceOption));
TemplatePackageCoordinator.cs (2)
647.WithOption(SharedOptions.ForceOption)); 1007Reporter.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)
281Assert.Equal("dotnet new search [<template-name>] --author Microsoft", Example.For<NewCommand>(parseResult).WithSubcommand<SearchCommand>().WithArgument(BaseSearchCommand.NameArgument).WithOption(SharedOptionsFactory.CreateAuthorOption(), "Microsoft"));