CommandLineBuilderExtensions.UseParseDirective 方法

定义

允许使用 [parse] 指令,当在命令行上指定该指令时,该指令将使正常命令处理短路,并显示一个说明命令行输入分析结果的关系图。

public static System.CommandLine.Builder.CommandLineBuilder UseParseDirective (this System.CommandLine.Builder.CommandLineBuilder builder, int? errorExitCode = default);
static member UseParseDirective : System.CommandLine.Builder.CommandLineBuilder * Nullable<int> -> System.CommandLine.Builder.CommandLineBuilder
<Extension()>
Public Function UseParseDirective (builder As CommandLineBuilder, Optional errorExitCode As Nullable(Of Integer) = Nothing) As CommandLineBuilder

参数

builder
CommandLineBuilder

命令行生成器。

errorExitCode
Nullable<Int32>

如果分析结果包含错误,则进程退出时将使用此退出代码。

返回

的同一 CommandLineBuilder实例。

适用于