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
Copy file name to clipboardExpand all lines: src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_Hosting_api_is_not_changed.approved.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
System.CommandLine.Hosting
2
2
public static class DirectiveConfigurationExtensions
3
-
public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddCommandLineDirectives(this Microsoft.Extensions.Configuration.IConfigurationBuilder config, System.CommandLine.ParseResult commandline, System.String name)
3
+
public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddCommandLineDirectives(this Microsoft.Extensions.Configuration.IConfigurationBuilder config, System.CommandLine.ParseResult commandline, System.CommandLine.Directive directive)
4
4
public static class HostingExtensions
5
5
public static OptionsBuilder<TOptions> BindCommandLine<TOptions>(this OptionsBuilder<TOptions> optionsBuilder)
6
6
public static Microsoft.Extensions.Hosting.IHost GetHost(this System.CommandLine.Invocation.InvocationContext invocationContext)
Copy file name to clipboardExpand all lines: src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_api_is_not_changed.approved.txt
+19-8Lines changed: 19 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -58,11 +58,11 @@ System.CommandLine
58
58
public class CommandLineBuilder
59
59
.ctor(Command rootCommand)
60
60
public Command Command { get; }
61
+
public System.Collections.Generic.List<Directive> Directives { get; }
61
62
public CommandLineBuilder AddMiddleware(System.CommandLine.Invocation.InvocationMiddleware middleware, System.CommandLine.Invocation.MiddlewareOrder order = Default)
62
63
public CommandLineBuilder AddMiddleware(System.Action<System.CommandLine.Invocation.InvocationContext> onInvoke, System.CommandLine.Invocation.MiddlewareOrder order = Default)
63
64
public CommandLineConfiguration Build()
64
65
public CommandLineBuilder CancelOnProcessTermination(System.Nullable<System.TimeSpan> timeout = null)
65
-
public CommandLineBuilder EnableDirectives(System.Boolean value = True)
66
66
public CommandLineBuilder EnablePosixBundling(System.Boolean value = True)
67
67
public CommandLineBuilder RegisterWithDotnetSuggest()
68
68
public CommandLineBuilder UseDefaults()
@@ -81,8 +81,8 @@ System.CommandLine
81
81
public CommandLineBuilder UseVersionOption(System.String name, System.String[] aliases)
82
82
public class CommandLineConfiguration
83
83
public static CommandLineBuilder CreateBuilder(Command rootCommand)
public System.Collections.Generic.IReadOnlyList<Directive> Directives { get; }
86
86
public System.Boolean EnablePosixBundling { get; }
87
87
public System.Boolean EnableTokenReplacement { get; }
88
88
public Command RootCommand { get; }
@@ -101,11 +101,13 @@ System.CommandLine
101
101
public static class ConsoleExtensions
102
102
public static System.Void Write(this IConsole console, System.String value)
103
103
public static System.Void WriteLine(this IConsole console, System.String value)
104
-
public class DirectiveCollection, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String,System.Collections.Generic.IEnumerable<System.String>>>, System.Collections.IEnumerable
public System.Collections.Generic.IEnumerable<System.CommandLine.Completions.CompletionItem> GetCompletions(System.CommandLine.Completions.CompletionContext context)
107
+
public System.Void SetAsynchronousHandler(System.Func<System.CommandLine.Invocation.InvocationContext,System.Threading.CancellationToken,System.Threading.Tasks.Task> handler)
108
+
public System.Void SetSynchronousHandler(System.Action<System.CommandLine.Invocation.InvocationContext> handler)
109
+
public class EnvironmentVariablesDirective : Directive
105
110
.ctor()
106
-
public System.Boolean Contains(System.String name)
107
-
public System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.String,System.Collections.Generic.IEnumerable<System.String>>> GetEnumerator()
108
-
public System.Boolean TryGetValues(System.String name, ref System.Collections.Generic.IReadOnlyList<System.String> values)
109
111
public static class Handler
110
112
public static System.Void SetHandler(this Command command, System.Action<System.CommandLine.Invocation.InvocationContext> handle)
111
113
public static System.Void SetHandler(this Command command, System.Action handle)
@@ -154,17 +156,19 @@ System.CommandLine
154
156
public static Option<System.IO.DirectoryInfo> AcceptExistingOnly(this Option<System.IO.DirectoryInfo> option)
155
157
public static Option<System.IO.FileSystemInfo> AcceptExistingOnly(this Option<System.IO.FileSystemInfo> option)
156
158
public static Option<T> AcceptExistingOnly<T>(this Option<T> option)
159
+
public class ParseDirective : Directive
160
+
.ctor(System.Int32 errorExitCode = 1)
157
161
public class ParseResult
158
162
public System.CommandLine.Parsing.CommandResult CommandResult { get; }
159
163
public CommandLineConfiguration Configuration { get; }
160
-
public System.Collections.Generic.IReadOnlyDictionary<System.String,System.Collections.Generic.IReadOnlyList<System.String>> Directives { get; }
161
164
public System.Collections.Generic.IReadOnlyList<System.CommandLine.Parsing.ParseError> Errors { get; }
162
165
public System.CommandLine.Parsing.CommandResult RootCommandResult { get; }
163
166
public System.Collections.Generic.IReadOnlyList<System.CommandLine.Parsing.Token> Tokens { get; }
164
167
public System.Collections.Generic.IReadOnlyList<System.String> UnmatchedTokens { get; }
165
168
public System.CommandLine.Parsing.ArgumentResult FindResultFor(Argument argument)
166
169
public System.CommandLine.Parsing.CommandResult FindResultFor(Command command)
167
170
public System.CommandLine.Parsing.OptionResult FindResultFor(Option option)
171
+
public System.CommandLine.Parsing.DirectiveResult FindResultFor(Directive directive)
168
172
public System.CommandLine.Parsing.SymbolResult FindResultFor(Symbol symbol)
169
173
public System.CommandLine.Completions.CompletionContext GetCompletionContext()
170
174
public System.Collections.Generic.IEnumerable<System.CommandLine.Completions.CompletionItem> GetCompletions(System.Nullable<System.Int32> position = null)
@@ -177,6 +181,8 @@ System.CommandLine
177
181
public static System.String ExecutableName { get; }
178
182
public static System.String ExecutablePath { get; }
179
183
.ctor(System.String description = )
184
+
public class SuggestDirective : Directive
185
+
.ctor()
180
186
public abstract class Symbol
181
187
public System.String Description { get; set; }
182
188
public System.Boolean IsHidden { get; set; }
@@ -337,6 +343,10 @@ System.CommandLine.Parsing
337
343
public System.CommandLine.Command Command { get; }
338
344
public Token Token { get; }
339
345
public System.String ToString()
346
+
public class DirectiveResult : SymbolResult
347
+
public System.CommandLine.Directive Directive { get; }
348
+
public Token Token { get; }
349
+
public System.Collections.Generic.IReadOnlyList<System.String> Values { get; }
340
350
public class OptionResult : SymbolResult
341
351
public System.Boolean IsImplicit { get; }
342
352
public System.CommandLine.Option Option { get; }
@@ -360,6 +370,7 @@ System.CommandLine.Parsing
360
370
public ArgumentResult FindResultFor(System.CommandLine.Argument argument)
361
371
public CommandResult FindResultFor(System.CommandLine.Command command)
362
372
public OptionResult FindResultFor(System.CommandLine.Option option)
373
+
public DirectiveResult FindResultFor(System.CommandLine.Directive directive)
0 commit comments