diff --git a/src/Common/OptionBuilder.cs b/src/Common/OptionBuilder.cs index 08e0938d62..25d33bb959 100644 --- a/src/Common/OptionBuilder.cs +++ b/src/Common/OptionBuilder.cs @@ -19,7 +19,7 @@ public static Option CreateOption(string name, Type valueType, string descriptio var optionType = typeof(Option<>).MakeGenericType(valueType); #if NET6_0_OR_GREATER - var ctor = (ConstructorInfo)optionType.GetMemberWithSameMetadataDefinitionAs(_ctor); + var ctor = (ConstructorInfo)optionType.GetMemberWithSameMetadataDefinitionAs(_ctor); #else var ctor = optionType.GetConstructor(new[] { typeof(string), typeof(string) }); #endif 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 13a6b83702..1dc2f6a0b0 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,9 +1,10 @@ System.CommandLine public abstract class Argument : Symbol, System.CommandLine.Binding.IValueDescriptor public ArgumentArity Arity { get; set; } - public System.Collections.Generic.ICollection>> Completions { get; } + public System.Collections.Generic.List>> CompletionSources { get; } public System.Boolean HasDefaultValue { get; } public System.String HelpName { get; set; } + public System.Collections.Generic.List> Validators { get; } public System.Type ValueType { get; } public System.Collections.Generic.IEnumerable GetCompletions(System.CommandLine.Completions.CompletionContext context) public System.Object GetDefaultValue() @@ -23,10 +24,6 @@ System.CommandLine public Argument AcceptLegalFileNamesOnly() public Argument AcceptLegalFilePathsOnly() public Argument AcceptOnlyFromAmong(System.String[] values) - public Argument AddCompletions(System.String[] completions) - public Argument AddCompletions(System.Func> completionsDelegate) - public Argument AddCompletions(System.Func> completionsDelegate) - public Argument AddValidator(System.Action validate) public System.Void SetDefaultValue(T value) public System.Void SetDefaultValueFactory(Func defaultValueFactory) public System.Void SetDefaultValueFactory(Func defaultValueFactory) @@ -55,6 +52,7 @@ System.CommandLine public System.Collections.Generic.IReadOnlyList