Class Cli
The main API for EntryPoint
Inheritance
Syntax
public static class Cli
Methods
| Improve this DocExecute<C>()
Executes a CliCommands implementation
Declaration
public static C Execute<C>()where C : BaseCliCommands, new ()
Type Parameters
| Name | Description |
|---|---|
| C | The type of the class implementing BaseCliCommands, which can be created with 0 arguments |
Execute<C>(C, String[])
Executes a CliCommands implementation
Declaration
public static C Execute<C>(C commands, string[] args)where C : BaseCliCommands
Parameters
| Type | Name | Description |
|---|---|---|
| C | commands | An instance of the class implementing BaseCliCommands |
| System.String[] | args | The CLI arguments input |
Type Parameters
| Name | Description |
|---|---|
| C | The type of the class implementing BaseCliCommands |
Execute<C>(String[])
Executes a CliCommands implementation
Declaration
public static C Execute<C>(string[] args)where C : BaseCliCommands, new ()
Parameters
| Type | Name | Description |
|---|---|---|
| System.String[] | args | The CLI arguments input |
Type Parameters
| Name | Description |
|---|---|
| C | The type of the class implementing BaseCliCommands, which can be created with 0 arguments |
GetHelp<A>()
Generate and return a Help string for a given BaseCliArguments or BaseCliCommands instance
Declaration
public static string GetHelp<A>()where A : IHelpable, new ()
Type Parameters
| Name | Description |
|---|---|
| A | Custom implementation type of BaseCliArguments or BaseCliCommands which can be created with 0 arguments |
GetHelp<A>(A)
Generate and return a Help string for a given BaseCliArguments or BaseCliCommands instance
Declaration
public static string GetHelp<A>(A applicationOptions)where A : IHelpable
Parameters
| Type | Name | Description |
|---|---|---|
| A | applicationOptions | Instance of the custom BaseCliArguments or BaseCliCommands implementation |
Type Parameters
| Name | Description |
|---|---|
| A | Custom implementation type of BaseCliArguments or BaseCliCommands |
Parse<A>()
Create and populate a CliArguments implementation from the command line args
Declaration
public static A Parse<A>()where A : BaseCliArguments, new ()
Type Parameters
| Name | Description |
|---|---|
| A | The type of the CliArguments, which derives from BaseCliArguments |
Parse<A>(A, String[])
Populate a given CliArguments instance
Declaration
public static A Parse<A>(A applicationOptions, string[] args)where A : BaseCliArguments
Parameters
| Type | Name | Description |
|---|---|---|
| A | applicationOptions | The pre-instantiated CliArguments implementation |
| System.String[] | args | The CLI arguments input |
Type Parameters
| Name | Description |
|---|---|
| A | The type of the CliArguments, which derives from BaseCliArguments |
Parse<A>(String[])
Create and populate an ApplicationOptions implementation
Declaration
public static A Parse<A>(string[] args)where A : BaseCliArguments, new ()
Parameters
| Type | Name | Description |
|---|---|---|
| System.String[] | args | The CLI arguments input |
Type Parameters
| Name | Description |
|---|---|
| A | The type of the CliArguments, which derives from BaseCliArguments |