通过


Command.Add 方法

定义

重载

名称 说明
Add(Argument)

向命令添加 a Argument

Add(Command)

向命令添加 a Command

Add(Option)

向命令添加一个 Option

Add(Argument)

Source:
Command.cs
Source:
Command.cs
Source:
Command.cs

向命令添加 a Argument

public:
 void Add(System::CommandLine::Argument ^ argument);
public void Add(System.CommandLine.Argument argument);
member this.Add : System.CommandLine.Argument -> unit
Public Sub Add (argument As Argument)

参数

argument
Argument

要添加到命令的选项。

适用于

Add(Command)

Source:
Command.cs
Source:
Command.cs
Source:
Command.cs

向命令添加 a Command

public:
 void Add(System::CommandLine::Command ^ command);
public void Add(System.CommandLine.Command command);
member this.Add : System.CommandLine.Command -> unit
Public Sub Add (command As Command)

参数

command
Command

要添加到命令的命令。

注解

命令可以嵌套到任意深度。

适用于

Add(Option)

Source:
Command.cs
Source:
Command.cs
Source:
Command.cs

向命令添加一个 Option

public:
 void Add(System::CommandLine::Option ^ option);
public void Add(System.CommandLine.Option option);
member this.Add : System.CommandLine.Option -> unit
Public Sub Add (option As Option)

参数

option
Option

要添加到命令的选项。

适用于