Muokkaa

Jaa


ParserExtensions.Invoke Method

Definition

Overloads

Invoke(Parser, String, IConsole)

Parses a command line string value and invokes the handler for the indicated command.

Invoke(Parser, String[], IConsole)

Parses a command line string array and invokes the handler for the indicated command.

Invoke(Parser, String, IConsole)

Parses a command line string value and invokes the handler for the indicated command.

public static int Invoke (this System.CommandLine.Parsing.Parser parser, string commandLine, System.CommandLine.IConsole? console = default);
static member Invoke : System.CommandLine.Parsing.Parser * string * System.CommandLine.IConsole -> int
<Extension()>
Public Function Invoke (parser As Parser, commandLine As String, Optional console As IConsole = Nothing) As Integer

Parameters

parser
Parser
commandLine
String
console
IConsole

Returns

The exit code for the invocation.

Remarks

The command line string input will be split into tokens as if it had been passed on the command line.

Applies to

Invoke(Parser, String[], IConsole)

Parses a command line string array and invokes the handler for the indicated command.

public static int Invoke (this System.CommandLine.Parsing.Parser parser, string[] args, System.CommandLine.IConsole? console = default);
static member Invoke : System.CommandLine.Parsing.Parser * string[] * System.CommandLine.IConsole -> int
<Extension()>
Public Function Invoke (parser As Parser, args As String(), Optional console As IConsole = Nothing) As Integer

Parameters

parser
Parser
args
String[]
console
IConsole

Returns

The exit code for the invocation.

Applies to