CliResult Class
Definition
- Namespace
- DotMake.CommandLine
- Assembly
- DotMake.CommandLine.dll
Describes the results of parsing a command line input based on a specific parser configuration and provides methods for binding the result to definition classes.
public class CliResult
- Inheritance
-
CliResult
Properties
| ParseResult |
Get the results of parsing a command line input based on a specific parser configuration. |
Methods
| Bind(Type, bool) |
Creates a new instance of the command definition class and binds/populates the properties from the parse result. Note that binding will be done only once per parse result and definition class, so calling this method consecutively for the same parse result and the same definition class will return the cached result.
If the command line input does not contain the indicated definition class (as self or as a parent), this method will return null
unless |
| Bind<TDefinition>(bool) |
Creates a new instance of the command definition class and binds/populates the properties from the parse result. Note that binding will be done only once per parse result and definition class, so calling this method consecutively for the same parse result and the same definition class will return the cached result.
If the command line input does not contain the indicated definition class (as self or as a parent), this method will return null
unless |
| BindAll() |
Creates a new instance of the definition class for all contained commands (self and parents) and binds/populates the properties from the parse result. Note that binding will be done only once per parse result and definition class, so calling this method consecutively for the same parse result and the same definition class will return the cached result. |
| BindCalled() |
Creates a new instance of the definition class for called command and binds/populates the properties from the parse result. Note that binding will be done only once per parse result and definition class, so calling this method consecutively for the same parse result and the same definition class will return the cached result. |
| Contains(Type) |
Checks if the command line input contains the indicated definition class (as self or as a parent). |
| Contains<TDefinition>() |
Checks if the command line input contains the indicated definition class (as self or as a parent). |
| Create(Type) |
Creates a new instance of the command definition class but without any binding. This is useful for example when you need to instantiate a definition class when using dependency injection. |
| Create<TDefinition>() |
Creates a new instance of the command definition class but without any binding. This is useful for example when you need to instantiate a definition class when using dependency injection. |
| IsCalled(Type) |
Checks if the command line input is for the indicated definition class. |
| IsCalled<TDefinition>() |
Checks if the command line input is for the indicated definition class. |