2 types derived from BaseInstallCommand
Microsoft.TemplateEngine.Cli (2)
Commands\install\InstallCommand.cs (1)
10
internal class InstallCommand :
BaseInstallCommand
Commands\install\LegacyInstallCommand.cs (1)
10
internal class LegacyInstallCommand :
BaseInstallCommand
27 references to BaseInstallCommand
Microsoft.TemplateEngine.Cli (26)
Commands\install\InstallCommandArgs.cs (6)
10
public InstallCommandArgs(
BaseInstallCommand
installCommand, ParseResult parseResult) : base(installCommand, parseResult)
12
var nameResult = parseResult.GetResult(
BaseInstallCommand
.NameArgument);
15
throw new ArgumentException($"{nameof(parseResult)} should contain at least one argument for {nameof(
BaseInstallCommand
.NameArgument)}", nameof(parseResult));
18
TemplatePackages = parseResult.GetValue(
BaseInstallCommand
.NameArgument)!;
28
throw new ArgumentException($"{nameof(parseResult)} should contain at least one argument for {nameof(
BaseInstallCommand
.NameArgument)}", nameof(parseResult));
33
Force = parseResult.GetValue(
BaseInstallCommand
.ForceOption);
TemplateInvoker.cs (1)
259
Reporter.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}"));
1006
Reporter.Error.WriteLine(LocalizableStrings.TemplatePackageCoordinator_lnstall_Error_AlreadyInstalled_Hint,
BaseInstallCommand
.ForceOption.Aliases.First());
1007
Reporter.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)
238
Assert.Equal("dotnet new install my-source", Example.For<NewCommand>(parseResult).WithSubcommand<InstallCommand>().WithArgument(
BaseInstallCommand
.NameArgument, "my-source"));