Udostępnij za pośrednictwem


CommandLineBuilderExtensions.UseParseDirective Metoda

Definicja

Umożliwia użycie dyrektywy, która po określeniu [parse] w wierszu polecenia będzie zwarcie normalnego obsługi poleceń i wyświetli diagram wyjaśniający wynik analizy dla danych wejściowych wiersza polecenia.

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

Parametry

builder
CommandLineBuilder

Konstruktor wiersza polecenia.

errorExitCode
Nullable<Int32>

Jeśli wynik analizy zawiera błędy, ten kod zakończenia będzie używany podczas zamykania procesu.

Zwraca

To samo wystąpienie klasy CommandLineBuilder.

Dotyczy