Table of Contents

CliParser Class

Definition

Namespace
DotMake.CommandLine
Assembly
DotMake.CommandLine.dll

Represents a CLI parser configured for a specific command with grammar and behaviors.

public class CliParser
Inheritance
CliParser

Properties

Command

The command that is used to parse the command line input.

RootCommand

The root of the command that is used to parse the command line input. If Command is already a root command, this will be same instance. If it's a sub-command, it will be the root of that sub-command.

Methods

Parse(string)

Parses a command line string and returns the parse result for the indicated command.

Parse(string[])

Parses a command line string array and returns the parse result for the indicated command.

Run(string)

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

Run(string[])

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

RunAsync(string, CancellationToken)

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

RunAsync(string[], CancellationToken)

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