Skip to content

Commit a8506cf

Browse files
authored
dotnet CLI: Rename source files for consistency (#48234)
2 parents 7aaefaf + 9f7e894 commit a8506cf

File tree

71 files changed

+286
-421
lines changed

Some content is hidden

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

71 files changed

+286
-421
lines changed

src/Cli/dotnet/Commands/Complete/Complete.cs renamed to src/Cli/dotnet/CliCompletion.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
using Microsoft.DotNet.Cli.Utils;
77
using static System.Array;
88

9-
namespace Microsoft.DotNet.Cli.Commands.Complete;
9+
namespace Microsoft.DotNet.Cli;
1010

11-
internal static class Complete
11+
internal static class CliCompletion
1212
{
1313
private static CompletionItem ToCompletionItem(string s) => new(s);
1414

src/Cli/dotnet/Commands/Help/HelpUsageText.cs renamed to src/Cli/dotnet/CliUsage.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
namespace Microsoft.DotNet.Cli.Commands.Help;
4+
using Microsoft.DotNet.Cli.Commands;
55

6-
internal static class HelpUsageText
6+
namespace Microsoft.DotNet.Cli;
7+
8+
internal static class CliUsage
79
{
8-
public static readonly string UsageText =
10+
public static readonly string HelpText =
911
$@"{CliCommandStrings.Usage}: dotnet [runtime-options] [path-to-application] [arguments]
1012
1113
{CliCommandStrings.ExecutionUsageDescription}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ private static CliCommand ConstructCommand()
2222
{
2323
var command = new DocumentedCommand("build-server", DocsLink, CliCommandStrings.BuildServerCommandDescription);
2424

25-
command.Subcommands.Add(ServerShutdownCommandParser.GetCommand());
25+
command.Subcommands.Add(BuildServerShutdownCommandParser.GetCommand());
2626

2727
command.SetAction((parseResult) => parseResult.HandleMissingCommand());
2828

src/Cli/dotnet/Commands/BuildServer/Shutdown/BuildServerShutdownCommand.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ public BuildServerShutdownCommand(
2323
IReporter reporter = null)
2424
: base(result)
2525
{
26-
bool msbuild = result.GetValue(ServerShutdownCommandParser.MSBuildOption);
27-
bool vbcscompiler = result.GetValue(ServerShutdownCommandParser.VbcsOption);
28-
bool razor = result.GetValue(ServerShutdownCommandParser.RazorOption);
26+
bool msbuild = result.GetValue(BuildServerShutdownCommandParser.MSBuildOption);
27+
bool vbcscompiler = result.GetValue(BuildServerShutdownCommandParser.VbcsOption);
28+
bool razor = result.GetValue(BuildServerShutdownCommandParser.RazorOption);
2929
bool all = !msbuild && !vbcscompiler && !razor;
3030

3131
_enumerationFlags = ServerEnumerationFlags.None;

src/Cli/dotnet/Commands/BuildServer/Shutdown/BuildServerShutdownCommandParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace Microsoft.DotNet.Cli.Commands.BuildServer.Shutdown;
77

8-
internal static class ServerShutdownCommandParser
8+
internal static class BuildServerShutdownCommandParser
99
{
1010
public static readonly CliOption<bool> MSBuildOption = new("--msbuild")
1111
{
File renamed without changes.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace Microsoft.DotNet.Cli.Commands.Format;
99

10-
public class FormatCommand(IEnumerable<string> argsToForward) : DotnetFormatForwardingApp(argsToForward)
10+
public class FormatCommand(IEnumerable<string> argsToForward) : FormatForwardingApp(argsToForward)
1111
{
1212
public static FormatCommand FromArgs(string[] args)
1313
{
@@ -31,6 +31,6 @@ public static int Run(ParseResult parseResult)
3131
public static int Run(string[] args)
3232
{
3333
DebugHelper.HandleDebugSwitch(ref args);
34-
return new DotnetFormatForwardingApp(args).Execute();
34+
return new FormatForwardingApp(args).Execute();
3535
}
3636
}

src/Cli/dotnet/Commands/Format/DotnetFormatForwardingApp.cs renamed to src/Cli/dotnet/Commands/Format/FormatForwardingApp.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace Microsoft.DotNet.Cli.Commands.Format;
55

6-
public class DotnetFormatForwardingApp(IEnumerable<string> argsToForward) : ForwardingApp(forwardApplicationPath: GetForwardApplicationPath(),
6+
public class FormatForwardingApp(IEnumerable<string> argsToForward) : ForwardingApp(forwardApplicationPath: GetForwardApplicationPath(),
77
argsToForward: argsToForward,
88
depsFile: GetDepsFilePath(),
99
runtimeConfig: GetRuntimeConfigPath())
File renamed without changes.

src/Cli/dotnet/Commands/Help/HelpCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static int Run(ParseResult result)
3131
public static void PrintHelp()
3232
{
3333
PrintVersionHeader();
34-
Reporter.Output.WriteLine(HelpUsageText.UsageText);
34+
Reporter.Output.WriteLine(CliUsage.HelpText);
3535
}
3636

3737
public static void PrintVersionHeader()
@@ -96,7 +96,7 @@ public int Execute()
9696
string.Format(
9797
CliCommandStrings.CommandDoesNotExist,
9898
helpArgs).Red());
99-
Reporter.Output.WriteLine(HelpUsageText.UsageText);
99+
Reporter.Output.WriteLine(CliUsage.HelpText);
100100
return 1;
101101
}
102102
}

0 commit comments

Comments
 (0)