2 types derived from BaseInstallCommand
Microsoft.TemplateEngine.Cli (2)
Commands\install\InstallCommand.cs (1)
10internal class InstallCommand : BaseInstallCommand
Commands\install\LegacyInstallCommand.cs (1)
10internal class LegacyInstallCommand : BaseInstallCommand
27 references to BaseInstallCommand
Microsoft.TemplateEngine.Cli (26)
Commands\install\InstallCommandArgs.cs (6)
10public InstallCommandArgs(BaseInstallCommand installCommand, ParseResult parseResult) : base(installCommand, parseResult) 12var nameResult = parseResult.GetResult(BaseInstallCommand.NameArgument); 15throw new ArgumentException($"{nameof(parseResult)} should contain at least one argument for {nameof(BaseInstallCommand.NameArgument)}", nameof(parseResult)); 18TemplatePackages = parseResult.GetValue(BaseInstallCommand.NameArgument)!; 28throw new ArgumentException($"{nameof(parseResult)} should contain at least one argument for {nameof(BaseInstallCommand.NameArgument)}", nameof(parseResult)); 33Force = parseResult.GetValue(BaseInstallCommand.ForceOption);
TemplateInvoker.cs (1)
259Reporter.Output.WriteCommand(Example.For<InstallCommand>(templateArgs.ParseResult).WithArgument(BaseInstallCommand.NameArgument, templatePackage.DisplayName));
TemplatePackageCoordinator.cs (7)
156.WithArgument(BaseInstallCommand.NameArgument, $"{versionCheckResult.TemplatePackage?.Identifier}::{versionCheckResult.LatestVersion}")); 646.WithArgument(BaseInstallCommand.NameArgument, installRequests.Select(ir => ir.DisplayName).ToArray()) 847.WithArgument(BaseInstallCommand.NameArgument, $"<package>::<version>")); 852.WithArgument(BaseInstallCommand.NameArgument, $"{displayableResults.First().Identifier}::{displayableResults.First().LatestVersion}")); 1006Reporter.Error.WriteLine(LocalizableStrings.TemplatePackageCoordinator_lnstall_Error_AlreadyInstalled_Hint, BaseInstallCommand.ForceOption.Aliases.First()); 1007Reporter.Error.WriteCommand(Example.For<InstallCommand>(parseResult).WithArgument(BaseInstallCommand.NameArgument, packageToInstall).WithOption(BaseInstallCommand.ForceOption));
TemplatePackageDisplay.cs (10)
58.WithArgument(BaseInstallCommand.NameArgument, $"{versionCheckResult.TemplatePackage?.Identifier}::{versionCheckResult.LatestVersion}")); 159_reporterError.WriteLine(LocalizableStrings.TemplatePackageCoordinator_lnstall_Error_AlreadyInstalled_Hint, BaseInstallCommand.ForceOption.Name); 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)); 306.WithArgument(BaseInstallCommand.NameArgument, $"<package>::<version>")); 311.WithArgument(BaseInstallCommand.NameArgument, $"{displayableResults.First().Identifier}::{displayableResults.First().LatestVersion}"));
TemplateSearch\CliTemplateSearchCoordinator.cs (2)
98.WithArgument(BaseInstallCommand.NameArgument)); 104.WithArgument(BaseInstallCommand.NameArgument, packageIdToShow));
Microsoft.TemplateEngine.Cli.UnitTests (1)
ParserTests\InstallTests.cs (1)
238Assert.Equal("dotnet new install my-source", Example.For<NewCommand>(parseResult).WithSubcommand<InstallCommand>().WithArgument(BaseInstallCommand.NameArgument, "my-source"));