diff --git a/samples/HostingPlayground/Program.cs b/samples/HostingPlayground/Program.cs index d1e24b9bbf..c1105bf04d 100644 --- a/samples/HostingPlayground/Program.cs +++ b/samples/HostingPlayground/Program.cs @@ -1,5 +1,4 @@ using System.CommandLine; -using System.CommandLine.Builder; using System.CommandLine.Hosting; using System.CommandLine.NamingConventionBinder; using Microsoft.Extensions.Hosting; diff --git a/src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_Hosting_api_is_not_changed.approved.txt b/src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_Hosting_api_is_not_changed.approved.txt index 751524148f..2cbc0bafdb 100644 --- a/src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_Hosting_api_is_not_changed.approved.txt +++ b/src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_Hosting_api_is_not_changed.approved.txt @@ -1,6 +1,6 @@ -System.CommandLine.Hosting +System.CommandLine.Hosting public static class DirectiveConfigurationExtensions - public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddCommandLineDirectives(this Microsoft.Extensions.Configuration.IConfigurationBuilder config, System.CommandLine.Parsing.ParseResult commandline, System.String name) + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddCommandLineDirectives(this Microsoft.Extensions.Configuration.IConfigurationBuilder config, System.CommandLine.ParseResult commandline, System.String name) public static class HostingExtensions public static OptionsBuilder BindCommandLine(this OptionsBuilder optionsBuilder) public static Microsoft.Extensions.Hosting.IHost GetHost(this System.CommandLine.Invocation.InvocationContext invocationContext) @@ -8,8 +8,8 @@ public static System.CommandLine.Invocation.InvocationContext GetInvocationContext(this Microsoft.Extensions.Hosting.HostBuilderContext context) public static Microsoft.Extensions.Hosting.IHostBuilder UseCommandHandler(this Microsoft.Extensions.Hosting.IHostBuilder builder) public static Microsoft.Extensions.Hosting.IHostBuilder UseCommandHandler(this Microsoft.Extensions.Hosting.IHostBuilder builder, System.Type commandType, System.Type handlerType) - public static System.CommandLine.Builder.CommandLineBuilder UseHost(this System.CommandLine.Builder.CommandLineBuilder builder, System.Action configureHost = null) - public static System.CommandLine.Builder.CommandLineBuilder UseHost(this System.CommandLine.Builder.CommandLineBuilder builder, System.Func hostBuilderFactory, System.Action configureHost = null) + public static System.CommandLine.CommandLineBuilder UseHost(this System.CommandLine.CommandLineBuilder builder, System.Action configureHost = null) + public static System.CommandLine.CommandLineBuilder UseHost(this System.CommandLine.CommandLineBuilder builder, System.Func hostBuilderFactory, System.Action configureHost = null) public static Microsoft.Extensions.Hosting.IHostBuilder UseInvocationLifetime(this Microsoft.Extensions.Hosting.IHostBuilder host, System.CommandLine.Invocation.InvocationContext invocation, System.Action configureOptions = null) public class InvocationLifetime, Microsoft.Extensions.Hosting.IHostLifetime .ctor(Microsoft.Extensions.Options.IOptions options, Microsoft.Extensions.Hosting.IHostEnvironment environment, Microsoft.Extensions.Hosting.IHostApplicationLifetime applicationLifetime, System.CommandLine.Invocation.InvocationContext context = null, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory = null) diff --git a/src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_NamingConventionBinder_api_is_not_changed.approved.txt b/src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_NamingConventionBinder_api_is_not_changed.approved.txt index d01b397a21..b509ade0c0 100644 --- a/src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_NamingConventionBinder_api_is_not_changed.approved.txt +++ b/src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_NamingConventionBinder_api_is_not_changed.approved.txt @@ -3,72 +3,72 @@ public static System.Void AddModelBinder(this System.CommandLine.Binding.BindingContext bindingContext, ModelBinder binder) public static ModelBinder GetOrCreateModelBinder(this System.CommandLine.Binding.BindingContext bindingContext, System.CommandLine.Binding.IValueDescriptor valueDescriptor) public static class CommandHandler - public static System.CommandLine.Invocation.ICommandHandler Create(Func> action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func> action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func> action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func> action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func> action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func> action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func> action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func> action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func> action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func> action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func> action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func> action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func> action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func> action) - public static System.CommandLine.Invocation.ICommandHandler Create(System.Delegate delegate) - public static System.CommandLine.Invocation.ICommandHandler Create(Action action) - public static System.CommandLine.Invocation.ICommandHandler Create(Action action) - public static System.CommandLine.Invocation.ICommandHandler Create(Action action) - public static System.CommandLine.Invocation.ICommandHandler Create(Action action) - public static System.CommandLine.Invocation.ICommandHandler Create(Action action) - public static System.CommandLine.Invocation.ICommandHandler Create(Action action) - public static System.CommandLine.Invocation.ICommandHandler Create(Action action) - public static System.CommandLine.Invocation.ICommandHandler Create(Action action) - public static System.CommandLine.Invocation.ICommandHandler Create(Action action) - public static System.CommandLine.Invocation.ICommandHandler Create(Action action) - public static System.CommandLine.Invocation.ICommandHandler Create(Action action) - public static System.CommandLine.Invocation.ICommandHandler Create(Action action) - public static System.CommandLine.Invocation.ICommandHandler Create(Action action) - public static System.CommandLine.Invocation.ICommandHandler Create(Action action) - public static System.CommandLine.Invocation.ICommandHandler Create(Action action) - public static System.CommandLine.Invocation.ICommandHandler Create(Action action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func> action) - public static System.CommandLine.Invocation.ICommandHandler Create(Func> action) - public static System.CommandLine.Invocation.ICommandHandler Create(System.Reflection.MethodInfo method, System.Object target = null) + public static System.CommandLine.ICommandHandler Create(Func> action) + public static System.CommandLine.ICommandHandler Create(Func> action) + public static System.CommandLine.ICommandHandler Create(Func> action) + public static System.CommandLine.ICommandHandler Create(Func> action) + public static System.CommandLine.ICommandHandler Create(Func> action) + public static System.CommandLine.ICommandHandler Create(Func> action) + public static System.CommandLine.ICommandHandler Create(Func> action) + public static System.CommandLine.ICommandHandler Create(Func> action) + public static System.CommandLine.ICommandHandler Create(Func> action) + public static System.CommandLine.ICommandHandler Create(Func> action) + public static System.CommandLine.ICommandHandler Create(Func> action) + public static System.CommandLine.ICommandHandler Create(Func> action) + public static System.CommandLine.ICommandHandler Create(Func> action) + public static System.CommandLine.ICommandHandler Create(Func> action) + public static System.CommandLine.ICommandHandler Create(System.Delegate delegate) + public static System.CommandLine.ICommandHandler Create(Action action) + public static System.CommandLine.ICommandHandler Create(Action action) + public static System.CommandLine.ICommandHandler Create(Action action) + public static System.CommandLine.ICommandHandler Create(Action action) + public static System.CommandLine.ICommandHandler Create(Action action) + public static System.CommandLine.ICommandHandler Create(Action action) + public static System.CommandLine.ICommandHandler Create(Action action) + public static System.CommandLine.ICommandHandler Create(Action action) + public static System.CommandLine.ICommandHandler Create(Action action) + public static System.CommandLine.ICommandHandler Create(Action action) + public static System.CommandLine.ICommandHandler Create(Action action) + public static System.CommandLine.ICommandHandler Create(Action action) + public static System.CommandLine.ICommandHandler Create(Action action) + public static System.CommandLine.ICommandHandler Create(Action action) + public static System.CommandLine.ICommandHandler Create(Action action) + public static System.CommandLine.ICommandHandler Create(Action action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func action) + public static System.CommandLine.ICommandHandler Create(Func> action) + public static System.CommandLine.ICommandHandler Create(Func> action) + public static System.CommandLine.ICommandHandler Create(System.Reflection.MethodInfo method, System.Object target = null) public class ConstructorDescriptor, IMethodDescriptor public System.Collections.Generic.IReadOnlyList ParameterDescriptors { get; } public ModelDescriptor Parent { get; } @@ -78,7 +78,7 @@ public static HandlerDescriptor FromMethodInfo(System.Reflection.MethodInfo methodInfo, System.Object target = null) public System.Collections.Generic.IReadOnlyList ParameterDescriptors { get; } public ModelDescriptor Parent { get; } - public System.CommandLine.Invocation.ICommandHandler GetCommandHandler() + public System.CommandLine.ICommandHandler GetCommandHandler() public System.String ToString() public interface IMethodDescriptor public System.Collections.Generic.IReadOnlyList ParameterDescriptors { get; } @@ -95,7 +95,7 @@ .ctor() public System.Void BindMemberFromValue(Expression> property, System.CommandLine.Binding.IValueDescriptor valueDescriptor) public System.Void BindMemberFromValue(Expression> property, Func getValue) - public class ModelBindingCommandHandler, System.CommandLine.Invocation.ICommandHandler + public class ModelBindingCommandHandler, System.CommandLine.ICommandHandler public System.Void BindParameter(System.Reflection.ParameterInfo param, System.CommandLine.Argument argument) public System.Void BindParameter(System.Reflection.ParameterInfo param, System.CommandLine.Option option) public System.Int32 Invoke(System.CommandLine.Invocation.InvocationContext context) diff --git a/src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_api_is_not_changed.approved.txt b/src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_api_is_not_changed.approved.txt index 77055af8ec..6b42819629 100644 --- a/src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_api_is_not_changed.approved.txt +++ b/src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_api_is_not_changed.approved.txt @@ -1,4 +1,4 @@ -System.CommandLine +System.CommandLine public abstract class Argument : Symbol, System.CommandLine.Binding.IValueDescriptor, System.CommandLine.Completions.ICompletionSource public ArgumentArity Arity { get; set; } public CompletionSourceList Completions { get; } @@ -43,13 +43,13 @@ public static TArgument FromAmong(this TArgument argument, System.String[] values) public static TArgument LegalFileNamesOnly(this TArgument argument) public static TArgument LegalFilePathsOnly(this TArgument argument) - public static System.CommandLine.Parsing.ParseResult Parse(this Argument argument, System.String commandLine) - public static System.CommandLine.Parsing.ParseResult Parse(this Argument argument, System.String[] args) + public static ParseResult Parse(this Argument argument, System.String commandLine) + public static ParseResult Parse(this Argument argument, System.String[] args) public class Command : IdentifierSymbol, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable, System.CommandLine.Completions.ICompletionSource .ctor(System.String name, System.String description = null) public System.Collections.Generic.IReadOnlyList Arguments { get; } public System.Collections.Generic.IEnumerable Children { get; } - public System.CommandLine.Invocation.ICommandHandler Handler { get; set; } + public ICommandHandler Handler { get; set; } public System.Collections.Generic.IReadOnlyList