Skip to content

Commit a1958c0

Browse files
System.CommandLine is split into too many namespaces (#1788)
* Move System.CommandLine.Builder to System.CommandLine * Move System.CommandLine.Parsing.ParseResult to System.CommandLine * Move System.CommandLine.Invocation.ICommandHandler to System.CommandLine * Remove System.CommandLine.Builder Namespace * Remove unnecessary whitespace * Remove unnecessary whitespace
1 parent 58b77e4 commit a1958c0

File tree

52 files changed

+155
-194
lines changed

Some content is hidden

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

52 files changed

+155
-194
lines changed

samples/HostingPlayground/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System.CommandLine;
2-
using System.CommandLine.Builder;
32
using System.CommandLine.Hosting;
43
using System.CommandLine.NamingConventionBinder;
54
using Microsoft.Extensions.Hosting;

src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_Hosting_api_is_not_changed.approved.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
System.CommandLine.Hosting
1+
System.CommandLine.Hosting
22
public static class DirectiveConfigurationExtensions
3-
public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddCommandLineDirectives(this Microsoft.Extensions.Configuration.IConfigurationBuilder config, System.CommandLine.Parsing.ParseResult commandline, System.String name)
3+
public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddCommandLineDirectives(this Microsoft.Extensions.Configuration.IConfigurationBuilder config, System.CommandLine.ParseResult commandline, System.String name)
44
public static class HostingExtensions
55
public static OptionsBuilder<TOptions> BindCommandLine<TOptions>(this OptionsBuilder<TOptions> optionsBuilder)
66
public static Microsoft.Extensions.Hosting.IHost GetHost(this System.CommandLine.Invocation.InvocationContext invocationContext)
77
public static System.CommandLine.Invocation.InvocationContext GetInvocationContext(this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder)
88
public static System.CommandLine.Invocation.InvocationContext GetInvocationContext(this Microsoft.Extensions.Hosting.HostBuilderContext context)
99
public static Microsoft.Extensions.Hosting.IHostBuilder UseCommandHandler<TCommand, THandler>(this Microsoft.Extensions.Hosting.IHostBuilder builder)
1010
public static Microsoft.Extensions.Hosting.IHostBuilder UseCommandHandler(this Microsoft.Extensions.Hosting.IHostBuilder builder, System.Type commandType, System.Type handlerType)
11-
public static System.CommandLine.Builder.CommandLineBuilder UseHost(this System.CommandLine.Builder.CommandLineBuilder builder, System.Action<Microsoft.Extensions.Hosting.IHostBuilder> configureHost = null)
12-
public static System.CommandLine.Builder.CommandLineBuilder UseHost(this System.CommandLine.Builder.CommandLineBuilder builder, System.Func<System.String[],Microsoft.Extensions.Hosting.IHostBuilder> hostBuilderFactory, System.Action<Microsoft.Extensions.Hosting.IHostBuilder> configureHost = null)
11+
public static System.CommandLine.CommandLineBuilder UseHost(this System.CommandLine.CommandLineBuilder builder, System.Action<Microsoft.Extensions.Hosting.IHostBuilder> configureHost = null)
12+
public static System.CommandLine.CommandLineBuilder UseHost(this System.CommandLine.CommandLineBuilder builder, System.Func<System.String[],Microsoft.Extensions.Hosting.IHostBuilder> hostBuilderFactory, System.Action<Microsoft.Extensions.Hosting.IHostBuilder> configureHost = null)
1313
public static Microsoft.Extensions.Hosting.IHostBuilder UseInvocationLifetime(this Microsoft.Extensions.Hosting.IHostBuilder host, System.CommandLine.Invocation.InvocationContext invocation, System.Action<InvocationLifetimeOptions> configureOptions = null)
1414
public class InvocationLifetime, Microsoft.Extensions.Hosting.IHostLifetime
1515
.ctor(Microsoft.Extensions.Options.IOptions<InvocationLifetimeOptions> options, Microsoft.Extensions.Hosting.IHostEnvironment environment, Microsoft.Extensions.Hosting.IHostApplicationLifetime applicationLifetime, System.CommandLine.Invocation.InvocationContext context = null, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory = null)

src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_NamingConventionBinder_api_is_not_changed.approved.txt

Lines changed: 68 additions & 68 deletions
Large diffs are not rendered by default.

src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_api_is_not_changed.approved.txt

Lines changed: 70 additions & 71 deletions
Large diffs are not rendered by default.

src/System.CommandLine.Benchmarks/CommandLine/Perf_Parser_Directives_Suggest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33

44
using System.CommandLine.Benchmarks.Helpers;
5-
using System.CommandLine.Builder;
65
using System.CommandLine.Invocation;
76
using System.CommandLine.Parsing;
87
using System.Threading.Tasks;

src/System.CommandLine.Benchmarks/CommandLine/Perf_Parser_ParseResult.cs

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

44
using System.Collections.Generic;
55
using System.CommandLine.Benchmarks.Helpers;
6-
using System.CommandLine.Builder;
76
using System.CommandLine.Parsing;
87
using System.Linq;
98
using BenchmarkDotNet.Attributes;

src/System.CommandLine.Benchmarks/CommandLine/Perf_Parser_Simple.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using BenchmarkDotNet.Attributes;
2-
using System.CommandLine.Builder;
32
using System.CommandLine.Invocation;
43
using System.CommandLine.Parsing;
54
using System.Threading.Tasks;

src/System.CommandLine.Benchmarks/CommandLine/Perf_Parser_TypoCorrection.cs

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

44
using System.Collections.Generic;
55
using System.CommandLine.Benchmarks.Helpers;
6-
using System.CommandLine.Builder;
76
using System.CommandLine.Parsing;
87
using System.Linq;
98
using System.Threading.Tasks;

src/System.CommandLine.DragonFruit.Tests/ConfigureFromMethodTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33

44
using System.CommandLine.Binding;
5-
using System.CommandLine.Builder;
65
using System.CommandLine.Invocation;
76
using System.CommandLine.IO;
87
using System.CommandLine.Parsing;

src/System.CommandLine.DragonFruit/CommandLine.cs

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

44
using System.Collections.Generic;
55
using System.CommandLine.Binding;
6-
using System.CommandLine.Builder;
76
using System.CommandLine.Invocation;
87
using System.CommandLine.NamingConventionBinder;
98
using System.CommandLine.Parsing;

0 commit comments

Comments
 (0)