ParseResultExtensions Class

Provides extension methods for ParseResult.

Definition

Namespace: DotMake.CommandLine
Assembly: DotMake.CommandLine (in DotMake.CommandLine.dll) Version: 1.8.8
C#
public static class ParseResultExtensions
Inheritance
Object    ParseResultExtensions

Methods

Bind(ParseResult, Type) 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 definition class, so calling this method consecutively for the same definition class will return the cached result.

If the command line input is not for the indicated definition class (e.g. it's for a sub-command but not for the indicated root command or vice versa), then the returned instance would be empty (i.e. properties would have default values).

BindTDefinition(ParseResult) 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 definition class, so calling this method consecutively for the same definition class will return the cached result.

If the command line input is not for the indicated definition class (e.g. it's for a sub-command but not for the indicated root command or vice versa), then the returned instance would be empty (i.e. properties would have default values).

See Also