Skip to content

Commit d5be56a

Browse files
Copilottmat
andcommitted
Update references to renamed CommandDefinition classes
Updated all code references from *CommandParser to *CommandDefinition for accessing static members (options, arguments, etc.). Updated Actions files to call XxxCommandDefinition.Create() instead of CreateCommandDefinition(). The GetCommand() API remains on *CommandParser classes. Co-authored-by: tmat <[email protected]>
1 parent f766dc4 commit d5be56a

File tree

67 files changed

+136
-136
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+136
-136
lines changed

src/Cli/dotnet/CommandFactory/CommandResolution/ProjectToolsCommandResolver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ internal void GenerateDepsJsonFile(
385385
string? stdOut;
386386
string? stdErr;
387387

388-
var msbuildArgs = MSBuildArgs.AnalyzeMSBuildArguments([..args], CommonOptions.PropertiesOption, CommonOptions.RestorePropertiesOption, BuildCommandParser.TargetOption, BuildCommandParser.VerbosityOption);
388+
var msbuildArgs = MSBuildArgs.AnalyzeMSBuildArguments([..args], CommonOptions.PropertiesOption, CommonOptions.RestorePropertiesOption, BuildCommandDefinition.TargetOption, BuildCommandDefinition.VerbosityOption);
389389
var forwardingAppWithoutLogging = new MSBuildForwardingAppWithoutLogging(msbuildArgs, msBuildExePath);
390390
if (forwardingAppWithoutLogging.ExecuteMSBuildOutOfProc)
391391
{

src/Cli/dotnet/CommandLineInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public static void PrintInfo()
2424
Reporter.Output.WriteLine($"{LocalizableStrings.DotNetSdkInfoLabel}");
2525
Reporter.Output.WriteLine($" Version: {Product.Version}");
2626
Reporter.Output.WriteLine($" Commit: {commitSha}");
27-
Reporter.Output.WriteLine($" Workload version: {WorkloadCommandParser.GetWorkloadsVersion()}");
27+
Reporter.Output.WriteLine($" Workload version: {WorkloadCommandDefinition.GetWorkloadsVersion()}");
2828
Reporter.Output.WriteLine($" MSBuild version: {MSBuildForwardingAppWithoutLogging.MSBuildVersion.ToString()}");
2929
Reporter.Output.WriteLine();
3030
Reporter.Output.WriteLine($"{LocalizableStrings.DotNetRuntimeInfoLabel}");
@@ -40,7 +40,7 @@ private static void PrintWorkloadsInfo()
4040
{
4141
Reporter.Output.WriteLine();
4242
Reporter.Output.WriteLine($"{LocalizableStrings.DotnetWorkloadInfoLabel}");
43-
WorkloadCommandParser.ShowWorkloadsInfo(showVersion: false);
43+
WorkloadCommandDefinition.ShowWorkloadsInfo(showVersion: false);
4444
}
4545

4646
private static string GetDisplayRid(DotnetVersionFile versionFile)

src/Cli/dotnet/Commands/Build/BuildCommand.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ public static CommandBase FromParseResult(ParseResult parseResult, string? msbui
2121
parseResult.ShowHelpOrErrorIfAppropriate();
2222

2323
CommonOptions.ValidateSelfContainedOptions(
24-
parseResult.HasOption(BuildCommandParser.SelfContainedOption),
25-
parseResult.HasOption(BuildCommandParser.NoSelfContainedOption));
24+
parseResult.HasOption(BuildCommandDefinition.SelfContainedOption),
25+
parseResult.HasOption(BuildCommandDefinition.NoSelfContainedOption));
2626

27-
bool noRestore = parseResult.HasOption(BuildCommandParser.NoRestoreOption);
27+
bool noRestore = parseResult.HasOption(BuildCommandDefinition.NoRestoreOption);
2828

2929
return CommandFactory.CreateVirtualOrPhysicalCommand(
3030
BuildCommandParser.GetCommand(),
31-
BuildCommandParser.SlnOrProjectOrFileArgument,
31+
BuildCommandDefinition.SlnOrProjectOrFileArgument,
3232
(msbuildArgs, appFilePath) => new VirtualProjectBuildingCommand(
3333
entryPointFileFullPath: Path.GetFullPath(appFilePath),
3434
msbuildArgs: msbuildArgs
@@ -42,7 +42,7 @@ public static CommandBase FromParseResult(ParseResult parseResult, string? msbui
4242
noRestore: noRestore,
4343
msbuildPath: msbuildPath
4444
),
45-
[CommonOptions.PropertiesOption, CommonOptions.RestorePropertiesOption, BuildCommandParser.TargetOption, BuildCommandParser.VerbosityOption],
45+
[CommonOptions.PropertiesOption, CommonOptions.RestorePropertiesOption, BuildCommandDefinition.TargetOption, BuildCommandDefinition.VerbosityOption],
4646
parseResult,
4747
msbuildPath
4848
);

src/Cli/dotnet/Commands/Build/BuildCommandParser.Actions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Microsoft.DotNet.Cli.Commands.Build;
88

99
internal static class BuildCommandParser
1010
{
11-
private static readonly Command Command = ConfigureCommand(CreateCommandDefinition());
11+
private static readonly Command Command = ConfigureCommand(BuildCommandDefinition.Create());
1212

1313
public static Command GetCommand()
1414
{

src/Cli/dotnet/Commands/BuildServer/BuildServerCommandParser.Actions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Microsoft.DotNet.Cli.Commands.BuildServer;
88

99
internal static class BuildServerCommandParser
1010
{
11-
private static readonly Command Command = ConfigureCommand(CreateCommandDefinition());
11+
private static readonly Command Command = ConfigureCommand(BuildServerCommandDefinition.Create());
1212

1313
public static Command GetCommand()
1414
{

src/Cli/dotnet/Commands/Clean/CleanCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static CommandBase FromParseResult(ParseResult result, string? msbuildPat
2222
result.ShowHelpOrErrorIfAppropriate();
2323
return CommandFactory.CreateVirtualOrPhysicalCommand(
2424
CleanCommandParser.GetCommand(),
25-
CleanCommandParser.SlnOrProjectOrFileArgument,
25+
CleanCommandDefinition.SlnOrProjectOrFileArgument,
2626
static (msbuildArgs, appFilePath) => new VirtualProjectBuildingCommand(
2727
entryPointFileFullPath: appFilePath,
2828
msbuildArgs: msbuildArgs)
@@ -33,7 +33,7 @@ public static CommandBase FromParseResult(ParseResult result, string? msbuildPat
3333
NoWriteBuildMarkers = true,
3434
},
3535
static (msbuildArgs, msbuildPath) => new CleanCommand(msbuildArgs, msbuildPath),
36-
[ CommonOptions.PropertiesOption, CommonOptions.RestorePropertiesOption, CleanCommandParser.TargetOption, CleanCommandParser.VerbosityOption ],
36+
[ CommonOptions.PropertiesOption, CommonOptions.RestorePropertiesOption, CleanCommandDefinition.TargetOption, CleanCommandDefinition.VerbosityOption ],
3737
result,
3838
msbuildPath
3939
);

src/Cli/dotnet/Commands/Clean/CleanCommandParser.Actions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace Microsoft.DotNet.Cli.Commands.Clean;
1010
internal static class CleanCommandParser
1111
{
1212

13-
private static readonly Command Command = ConfigureCommand(CreateCommandDefinition());
13+
private static readonly Command Command = ConfigureCommand(CleanCommandDefinition.Create());
1414

1515
public static Command GetCommand()
1616
{

src/Cli/dotnet/Commands/Dnx/DnxCommandParser.Actions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Microsoft.DotNet.Cli.Commands.Dnx;
99
internal static class DnxCommandParser
1010
{
1111

12-
public static readonly Command Command = ConfigureCommand(CreateCommandDefinition());
12+
public static readonly Command Command = ConfigureCommand(DnxCommandDefinition.Create());
1313

1414

1515
public static Command GetCommand()

src/Cli/dotnet/Commands/Format/FormatCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public static FormatCommand FromArgs(string[] args)
1919

2020
public static FormatCommand FromParseResult(ParseResult result)
2121
{
22-
return new FormatCommand(result.GetValue(FormatCommandParser.Arguments));
22+
return new FormatCommand(result.GetValue(FormatCommandDefinition.Arguments));
2323
}
2424

2525
public static int Run(ParseResult parseResult)

src/Cli/dotnet/Commands/Format/FormatCommandParser.Actions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace Microsoft.DotNet.Cli.Commands.Format;
77

88
internal static class FormatCommandParser
99
{
10-
private static readonly Command Command = ConfigureCommand(CreateCommandDefinition());
10+
private static readonly Command Command = ConfigureCommand(FormatCommandDefinition.Create());
1111

1212
public static Command GetCommand()
1313
{

0 commit comments

Comments
 (0)