CommandLineParserParse(ReadOnlyMemoryString) Method

Parses the specified command line arguments.

Definition

Namespace: Ookii.CommandLine
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.2.0+a4d3631e4dcc0970081ed435288efdebc1325f83
C#
public Object? Parse(
	ReadOnlyMemory<string> args
)

Parameters

args  ReadOnlyMemoryString
The command line arguments.

Return Value

Object
An instance of the type specified by the ArgumentsType property, or if argument parsing was canceled by the ArgumentParsed event handler, the CommandLineArgumentAttributeCancelParsing property, or a method argument that returned CancelModeAbort or .

Remarks

If the return value is , check the HelpRequested property to see if usage help should be displayed.

Exceptions

CommandLineArgumentException An error occurred parsing the command line. Check the CommandLineArgumentExceptionCategory property for the exact reason for the error.

See Also