You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Rename to AcceptExistingOnly
* Rename to AcceptOnlyFromAmong
* Move non-generic extensions to be instance methods
* Rename to AcceptLegalFile[Names|Paths]Only
* Align arguments to the word completion
* Address feedback: remove the Extensions suffix
* Fix release build: one rename was missing
* Missing ApiCompat changes
* Missing ApiCompat changes RE: Arity on option
Copy file name to clipboardExpand all lines: src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_api_is_not_changed.approved.txt
+27-27Lines changed: 27 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,17 @@ System.CommandLine
5
5
public System.Boolean HasDefaultValue { get; }
6
6
public System.String HelpName { get; set; }
7
7
public System.Type ValueType { get; }
8
+
public Argument AcceptLegalFileNamesOnly()
9
+
public Argument AcceptLegalFilePathsOnly()
10
+
public Argument AcceptOnlyFromAmong(System.String[] values)
11
+
public Argument AddCompletions(System.String[] completions)
12
+
public Argument AddCompletions(System.Func<System.CommandLine.Completions.CompletionContext,System.Collections.Generic.IEnumerable<System.String>> completionsDelegate)
13
+
public Argument AddCompletions(System.Func<System.CommandLine.Completions.CompletionContext,System.Collections.Generic.IEnumerable<System.CommandLine.Completions.CompletionItem>> completionsDelegate)
8
14
public System.Void AddValidator(System.Action<System.CommandLine.Parsing.ArgumentResult> validate)
9
15
public System.Collections.Generic.IEnumerable<System.CommandLine.Completions.CompletionItem> GetCompletions(System.CommandLine.Completions.CompletionContext context)
10
16
public System.Object GetDefaultValue()
17
+
public ParseResult Parse(System.String commandLine)
18
+
public ParseResult Parse(System.String[] args)
11
19
public System.Void SetDefaultValue(System.Object value)
12
20
public System.Void SetDefaultValueFactory(System.Func<System.Object> defaultValueFactory)
13
21
public System.Void SetDefaultValueFactory(System.Func<System.CommandLine.Parsing.ArgumentResult,System.Object> defaultValueFactory)
@@ -32,19 +40,11 @@ System.CommandLine
32
40
public System.Boolean Equals(ArgumentArity other)
33
41
public System.Boolean Equals(System.Object obj)
34
42
public System.Int32 GetHashCode()
35
-
public static class ArgumentExtensions
36
-
public static TArgument AddCompletions<TArgument>(this TArgument argument, System.String[] values)
37
-
public static TArgument AddCompletions<TArgument>(this TArgument argument, System.Func<System.CommandLine.Completions.CompletionContext,System.Collections.Generic.IEnumerable<System.String>> complete)
38
-
public static TArgument AddCompletions<TArgument>(this TArgument argument, System.Func<System.CommandLine.Completions.CompletionContext,System.Collections.Generic.IEnumerable<System.CommandLine.Completions.CompletionItem>> complete)
39
-
public static Argument<System.IO.FileInfo> ExistingOnly(this Argument<System.IO.FileInfo> argument)
40
-
public static Argument<System.IO.DirectoryInfo> ExistingOnly(this Argument<System.IO.DirectoryInfo> argument)
41
-
public static Argument<System.IO.FileSystemInfo> ExistingOnly(this Argument<System.IO.FileSystemInfo> argument)
42
-
public static Argument<T> ExistingOnly<T>(this Argument<T> argument)
43
-
public static TArgument FromAmong<TArgument>(this TArgument argument, System.String[] values)
44
-
public static TArgument LegalFileNamesOnly<TArgument>(this TArgument argument)
45
-
public static TArgument LegalFilePathsOnly<TArgument>(this TArgument argument)
46
-
public static ParseResult Parse(this Argument argument, System.String commandLine)
47
-
public static ParseResult Parse(this Argument argument, System.String[] args)
43
+
public static class ArgumentValidation
44
+
public static Argument<System.IO.FileInfo> AcceptExistingOnly(this Argument<System.IO.FileInfo> argument)
45
+
public static Argument<System.IO.DirectoryInfo> AcceptExistingOnly(this Argument<System.IO.DirectoryInfo> argument)
46
+
public static Argument<System.IO.FileSystemInfo> AcceptExistingOnly(this Argument<System.IO.FileSystemInfo> argument)
47
+
public static Argument<T> AcceptExistingOnly<T>(this Argument<T> argument)
48
48
public class Command : IdentifierSymbol, System.Collections.Generic.IEnumerable<Symbol>, System.Collections.IEnumerable
public static System.Void Add(this System.Collections.Generic.ICollection<System.Func<System.CommandLine.Completions.CompletionContext,System.Collections.Generic.IEnumerable<System.CommandLine.Completions.CompletionItem>>> completionSources, System.Func<System.CommandLine.Completions.CompletionContext,System.Collections.Generic.IEnumerable<System.String>> complete)
112
+
public static System.Void Add(this System.Collections.Generic.ICollection<System.Func<System.CommandLine.Completions.CompletionContext,System.Collections.Generic.IEnumerable<System.CommandLine.Completions.CompletionItem>>> completionSources, System.Func<System.CommandLine.Completions.CompletionContext,System.Collections.Generic.IEnumerable<System.String>> completionsDelegate)
113
113
public static System.Void Add(this System.Collections.Generic.ICollection<System.Func<System.CommandLine.Completions.CompletionContext,System.Collections.Generic.IEnumerable<System.CommandLine.Completions.CompletionItem>>> completionSources, System.String[] completions)
114
114
public static class ConsoleExtensions
115
115
public static System.Void Write(this IConsole console, System.String value)
@@ -193,9 +193,17 @@ System.CommandLine
193
193
public ArgumentArity Arity { get; set; }
194
194
public System.Boolean IsRequired { get; set; }
195
195
public System.Type ValueType { get; }
196
+
public Option AcceptLegalFileNamesOnly()
197
+
public Option AcceptLegalFilePathsOnly()
198
+
public Option AcceptOnlyFromAmong(System.String[] values)
199
+
public Option AddCompletions(System.String[] completions)
200
+
public Option AddCompletions(System.Func<System.CommandLine.Completions.CompletionContext,System.Collections.Generic.IEnumerable<System.String>> completionsDelegate)
201
+
public Option AddCompletions(System.Func<System.CommandLine.Completions.CompletionContext,System.Collections.Generic.IEnumerable<System.CommandLine.Completions.CompletionItem>> completionsDelegate)
196
202
public System.Void AddValidator(System.Action<System.CommandLine.Parsing.OptionResult> validate)
197
203
public System.Collections.Generic.IEnumerable<System.CommandLine.Completions.CompletionItem> GetCompletions(System.CommandLine.Completions.CompletionContext context)
198
204
public System.Boolean HasAliasIgnoringPrefix(System.String alias)
205
+
public ParseResult Parse(System.String commandLine)
206
+
public ParseResult Parse(System.String[] args)
199
207
public System.Void SetDefaultValue(System.Object value)
200
208
public System.Void SetDefaultValueFactory(System.Func<System.Object> defaultValueFactory)
201
209
public class Option<T> : Option, IValueDescriptor<T>, System.CommandLine.Binding.IValueDescriptor
0 commit comments