Header menu logo Argu

ParseResults<'Template> Type

Argument parsing result holder.

Instance members

Instance member Description

this.Catch

Full Usage: this.Catch

Parameters:
    f : unit -> 'T - The operation to be executed.
    ?errorCode : ErrorCode - The error code to be returned.
    ?showUsage : bool - Print usage together with error message. Defaults to true

Returns: 'T

Handles any raised exception through the argument parser's exiter mechanism.

f : unit -> 'T

The operation to be executed.

?errorCode : ErrorCode

The error code to be returned.

?showUsage : bool

Print usage together with error message. Defaults to true

Returns: 'T

this.Contains

Full Usage: this.Contains

Parameters:
    expr : Expr<('Field -> 'Template)> - The name of the parameter, expressed as quotation of DU constructor.
    ?source : ParseSource - Optional source restriction: AppSettings or CommandLine.

Returns: bool

Checks if parameter of specific kind has been specified.

expr : Expr<('Field -> 'Template)>

The name of the parameter, expressed as quotation of DU constructor.

?source : ParseSource

Optional source restriction: AppSettings or CommandLine.

Returns: bool

this.Contains

Full Usage: this.Contains

Parameters:
    expr : Expr<'Template> - The name of the parameter, expressed as quotation of DU constructor.
    ?source : ParseSource - Optional source restriction: AppSettings or CommandLine.

Returns: bool

Checks if parameter of specific kind has been specified.

expr : Expr<'Template>

The name of the parameter, expressed as quotation of DU constructor.

?source : ParseSource

Optional source restriction: AppSettings or CommandLine.

Returns: bool

this.ErrorHandler

Full Usage: this.ErrorHandler

Returns: IExiter
Returns: IExiter

this.GetAllResults

Full Usage: this.GetAllResults

Parameters:
    ?source : ParseSource - Optional source restriction: AppSettings or CommandLine.

Returns: 'Template list

Gets all parse results.

?source : ParseSource

Optional source restriction: AppSettings or CommandLine.

Returns: 'Template list

this.GetResult

Full Usage: this.GetResult

Parameters:
    expr : Expr<('Field -> 'Template)> - The name of the parameter, expressed as quotation of DU constructor.
    parser : 'Field -> 'R - The post-processing parser.
    ?source : ParseSource - Optional source restriction: AppSettings or CommandLine.

Returns: 'R

Returns the *last* specified parameter of given type. Command line parameters have precedence over AppSettings parameters. Results are passed to a post-processing function that is error handled by the parser.

expr : Expr<('Field -> 'Template)>

The name of the parameter, expressed as quotation of DU constructor.

parser : 'Field -> 'R

The post-processing parser.

?source : ParseSource

Optional source restriction: AppSettings or CommandLine.

Returns: 'R

this.GetResult

Full Usage: this.GetResult

Parameters:
    expr : Expr<('Field -> 'Template)> - The name of the parameter, expressed as quotation of DU constructor.
    defaultValue : 'Field - Use this if no parameter of specific kind has been specified.
    parser : 'Field -> 'R - The post-processing parser.
    ?source : ParseSource - Optional source restriction: AppSettings or CommandLine.
    ?errorCode : ErrorCode - The error code to be returned.
    ?showUsage : bool - Print usage together with error message.

Returns: 'R

Returns the *last* specified parameter of given type. Results are passed to a post-processing function parse that is error handled by the parser. Command line parameters have precedence over AppSettings parameters.

expr : Expr<('Field -> 'Template)>

The name of the parameter, expressed as quotation of DU constructor.

defaultValue : 'Field

Use this if no parameter of specific kind has been specified.

parser : 'Field -> 'R

The post-processing parser.

?source : ParseSource

Optional source restriction: AppSettings or CommandLine.

?errorCode : ErrorCode

The error code to be returned.

?showUsage : bool

Print usage together with error message.

Returns: 'R

this.GetResult

Full Usage: this.GetResult

Parameters:
    expr : Expr<('Field -> 'Template)> - The name of the parameter, expressed as quotation of DU constructor.
    defThunk : unit -> 'Field - Function used to default if no parameter has been specified. Any resulting Exception will be trapped, and the Exception's .Message will be used as the Failure Message as per Raise and Catch.
    parser : 'Field -> 'R - The post-processing parser.
    ?source : ParseSource - Optional source restriction: AppSettings or CommandLine.
    ?errorCode : ErrorCode - The error code to be returned.
    ?showUsage : bool - Print usage together with error message. Defaults to true

Returns: 'R

Returns the *last* specified parameter of given type, trapping exceptions from the defThunk used if no argument has been supplied. Results are passed to a post-processing function parse that is error handled by the parser. Command line parameters have precedence over AppSettings parameters.

expr : Expr<('Field -> 'Template)>

The name of the parameter, expressed as quotation of DU constructor.

defThunk : unit -> 'Field

Function used to default if no parameter has been specified. Any resulting Exception will be trapped, and the Exception's .Message will be used as the Failure Message as per Raise and Catch.

parser : 'Field -> 'R

The post-processing parser.

?source : ParseSource

Optional source restriction: AppSettings or CommandLine.

?errorCode : ErrorCode

The error code to be returned.

?showUsage : bool

Print usage together with error message. Defaults to true

Returns: 'R

this.GetResult

Full Usage: this.GetResult

Parameters:
    expr : Expr<('Field -> 'Template)> - The name of the parameter, expressed as quotation of DU constructor.
    defThunk : unit -> 'Field - Function used to default if no parameter has been specified. Any resulting Exception will be trapped, and the Exception's .Message will be used as the Failure Message as per Raise and Catch.
    ?source : ParseSource - Optional source restriction: AppSettings or CommandLine.
    ?errorCode : ErrorCode - The error code to be returned.
    ?showUsage : bool - Print usage together with error message.

Returns: 'Field

Returns the *last* specified parameter of given type, trapping exceptions from the defThunk used if no argument has been supplied. Command line parameters have precedence over AppSettings parameters.

expr : Expr<('Field -> 'Template)>

The name of the parameter, expressed as quotation of DU constructor.

defThunk : unit -> 'Field

Function used to default if no parameter has been specified. Any resulting Exception will be trapped, and the Exception's .Message will be used as the Failure Message as per Raise and Catch.

?source : ParseSource

Optional source restriction: AppSettings or CommandLine.

?errorCode : ErrorCode

The error code to be returned.

?showUsage : bool

Print usage together with error message.

Returns: 'Field

this.GetResult

Full Usage: this.GetResult

Parameters:
    expr : Expr<('Field -> 'Template)> - The name of the parameter, expressed as quotation of DU constructor.
    ?defaultValue : 'Field - Return this if no parameter of specific kind has been specified.
    ?source : ParseSource - Optional source restriction: AppSettings or CommandLine.

Returns: 'Field

Returns the *last* specified parameter of given type. Command line parameters have precedence over AppSettings parameters.

expr : Expr<('Field -> 'Template)>

The name of the parameter, expressed as quotation of DU constructor.

?defaultValue : 'Field

Return this if no parameter of specific kind has been specified.

?source : ParseSource

Optional source restriction: AppSettings or CommandLine.

Returns: 'Field

this.GetResult

Full Usage: this.GetResult

Parameters:
    expr : Expr<'Template> - The name of the parameter, expressed as quotation of DU constructor.
    ?defaultValue : 'Template - Return this if no parameter of specific kind has been specified.
    ?source : ParseSource - Optional source restriction: AppSettings or CommandLine.

Returns: 'Template

Returns the *last* specified parameter of given type. Command line parameters have precedence over AppSettings parameters.

expr : Expr<'Template>

The name of the parameter, expressed as quotation of DU constructor.

?defaultValue : 'Template

Return this if no parameter of specific kind has been specified.

?source : ParseSource

Optional source restriction: AppSettings or CommandLine.

Returns: 'Template

this.GetResults

Full Usage: this.GetResults

Parameters:
    expr : Expr<('Field -> 'Template)> - The name of the parameter, expressed as quotation of DU constructor.
    parser : 'Field -> 'R - The post-processing parser.
    ?source : ParseSource - Optional source restriction: AppSettings or CommandLine.

Returns: 'R list

Query parse results for given argument kind. Command line parameters have precedence over AppSettings parameters. Results are passed to a post-processing function that is error handled by the parser.

expr : Expr<('Field -> 'Template)>

The name of the parameter, expressed as quotation of DU constructor.

parser : 'Field -> 'R

The post-processing parser.

?source : ParseSource

Optional source restriction: AppSettings or CommandLine.

Returns: 'R list

this.GetResults

Full Usage: this.GetResults

Parameters:
    expr : Expr<('Field -> 'Template)> - The name of the parameter, expressed as quotation of DU constructor.
    ?source : ParseSource - Optional source restriction: AppSettings or CommandLine.

Returns: 'Field list

Query parse results for argument with parameters.

expr : Expr<('Field -> 'Template)>

The name of the parameter, expressed as quotation of DU constructor.

?source : ParseSource

Optional source restriction: AppSettings or CommandLine.

Returns: 'Field list

this.GetResults

Full Usage: this.GetResults

Parameters:
    expr : Expr<'Template> - The name of the parameter, expressed as quotation of DU constructor.
    ?source : ParseSource - Optional source restriction: AppSettings or CommandLine.

Returns: 'Template list

Query parse results for parameterless argument.

expr : Expr<'Template>

The name of the parameter, expressed as quotation of DU constructor.

?source : ParseSource

Optional source restriction: AppSettings or CommandLine.

Returns: 'Template list

this.GetSubCommand

Full Usage: this.GetSubCommand

Returns: 'Template

Attempts to recover the subcommand parameter from the results, if one has been specified.

Returns: 'Template

this.IsUsageRequested

Full Usage: this.IsUsageRequested

Returns: bool

Returns true if '--help' parameter has been specified in the command line.

Returns: bool

this.IterResult

Full Usage: this.IterResult

Parameters:
    expr : Expr<('Field -> 'Template)> - The name of the parameter, expressed as quotation of DU constructor.
    iterator : 'Field -> unit - The iterator body.
    ?source : ParseSource - Option source restriction: AppSettings or CommandLine.

Iterates through the *last* parse result for a given argument kind. Command line parameters have precedence over AppSettings parameters. Results are passed to an iterator function that is error handled by the parser.

expr : Expr<('Field -> 'Template)>

The name of the parameter, expressed as quotation of DU constructor.

iterator : 'Field -> unit

The iterator body.

?source : ParseSource

Option source restriction: AppSettings or CommandLine.

this.IterResults

Full Usage: this.IterResults

Parameters:
    expr : Expr<('Field -> 'Template)> - The name of the parameter, expressed as quotation of DU constructor.
    iterator : 'Field -> unit - The iterator body.
    ?source : ParseSource - Option source restriction: AppSettings or CommandLine.

Iterates through *all* parse results for a given argument kind. Command line parameters have precedence over AppSettings parameters. Results are passed to an iterator function that is error handled by the parser.

expr : Expr<('Field -> 'Template)>

The name of the parameter, expressed as quotation of DU constructor.

iterator : 'Field -> unit

The iterator body.

?source : ParseSource

Option source restriction: AppSettings or CommandLine.

this.PostProcessResult

Full Usage: this.PostProcessResult

Parameters:
    expr : Expr<('Field -> 'Template)> - The name of the parameter, expressed as quotation of DU constructor.
    parser : 'Field -> 'R - The post-processing parser.
    ?source : ParseSource - Optional source restriction: AppSettings or CommandLine.

Returns: 'R

Returns the *last* specified parameter of given type. Command line parameters have precedence over AppSettings parameters. Results are passed to a post-processing function that is error handled by the parser.

expr : Expr<('Field -> 'Template)>

The name of the parameter, expressed as quotation of DU constructor.

parser : 'Field -> 'R

The post-processing parser.

?source : ParseSource

Optional source restriction: AppSettings or CommandLine.

Returns: 'R

this.PostProcessResults

Full Usage: this.PostProcessResults

Parameters:
    expr : Expr<('Field -> 'Template)> - The name of the parameter, expressed as quotation of DU constructor.
    parser : 'Field -> 'R - The post-processing parser.
    ?source : ParseSource - Optional source restriction: AppSettings or CommandLine.

Returns: 'R list

Query parse results for given argument kind. Command line parameters have precedence over AppSettings parameters. Results are passed to a post-processing function that is error handled by the parser.

expr : Expr<('Field -> 'Template)>

The name of the parameter, expressed as quotation of DU constructor.

parser : 'Field -> 'R

The post-processing parser.

?source : ParseSource

Optional source restriction: AppSettings or CommandLine.

Returns: 'R list

this.ProgramName

Full Usage: this.ProgramName

Returns: string
Returns: string

this.Raise

Full Usage: this.Raise

Parameters:
    error : exn - The error to be displayed.
    ?errorCode : ErrorCode - The error code to be returned.
    ?showUsage : bool - Print usage together with error message.

Returns: 'T

Raise an error through the argument parser's exiter mechanism. Display usage optionally.

error : exn

The error to be displayed.

?errorCode : ErrorCode

The error code to be returned.

?showUsage : bool

Print usage together with error message.

Returns: 'T

this.Raise

Full Usage: this.Raise

Parameters:
    msg : string - The error message to be displayed.
    ?errorCode : ErrorCode - The error code to be returned.
    ?showUsage : bool - Print usage together with error message.

Returns: 'T

Raise an error through the argument parser's exiter mechanism. Display usage optionally.

msg : string

The error message to be displayed.

?errorCode : ErrorCode

The error code to be returned.

?showUsage : bool

Print usage together with error message.

Returns: 'T

this.TryGetResult

Full Usage: this.TryGetResult

Parameters:
    expr : Expr<('Field -> 'Template)> - The name of the parameter, expressed as quotation of DU constructor.
    parser : 'Field -> 'R - The post-processing parser.
    ?source : ParseSource - Optional source restriction: AppSettings or CommandLine.

Returns: 'R option

Returns the *last* specified parameter of given type. Command line parameters have precedence over AppSettings parameters. Results are passed to a post-processing function that is error handled by the parser.

expr : Expr<('Field -> 'Template)>

The name of the parameter, expressed as quotation of DU constructor.

parser : 'Field -> 'R

The post-processing parser.

?source : ParseSource

Optional source restriction: AppSettings or CommandLine.

Returns: 'R option

this.TryGetResult

Full Usage: this.TryGetResult

Parameters:
    expr : Expr<('Field -> 'Template)> - The name of the parameter, expressed as quotation of DU constructor.
    ?source : ParseSource - Optional source restriction: AppSettings or CommandLine.

Returns: 'Field option

Returns the *last* specified parameter of given type, if it exists. Command line parameters have precedence over AppSettings parameters.

expr : Expr<('Field -> 'Template)>

The name of the parameter, expressed as quotation of DU constructor.

?source : ParseSource

Optional source restriction: AppSettings or CommandLine.

Returns: 'Field option

this.TryGetResult

Full Usage: this.TryGetResult

Parameters:
    expr : Expr<'Template> - The name of the parameter, expressed as quotation of DU constructor.
    ?source : ParseSource - Optional source restriction: AppSettings or CommandLine.

Returns: 'Template option

Returns the *last* specified parameter of given type, if it exists. Command line parameters have precedence over AppSettings parameters.

expr : Expr<'Template>

The name of the parameter, expressed as quotation of DU constructor.

?source : ParseSource

Optional source restriction: AppSettings or CommandLine.

Returns: 'Template option

this.TryGetSubCommand

Full Usage: this.TryGetSubCommand

Returns: 'Template option

Attempts to recover the subcommand parameter from the results, if one has been specified.

Returns: 'Template option

this.TryPostProcessResult

Full Usage: this.TryPostProcessResult

Parameters:
    expr : Expr<('Field -> 'Template)> - The name of the parameter, expressed as quotation of DU constructor.
    parser : 'Field -> 'R - The post-processing parser.
    ?source : ParseSource - Optional source restriction: AppSettings or CommandLine.

Returns: 'R option

Returns the *last* specified parameter of given type. Command line parameters have precedence over AppSettings parameters. Results are passed to a post-processing function that is error handled by the parser.

expr : Expr<('Field -> 'Template)>

The name of the parameter, expressed as quotation of DU constructor.

parser : 'Field -> 'R

The post-processing parser.

?source : ParseSource

Optional source restriction: AppSettings or CommandLine.

Returns: 'R option

this.UnrecognizedCliParams

Full Usage: this.UnrecognizedCliParams

Returns: string list

Gets all unrecognized CLI parameters which accumulates if parsed with 'ignoreUnrecognized = true'

Returns: string list

this.UnrecognizedCliParseResults

Full Usage: this.UnrecognizedCliParseResults

Returns: obj list

Gets all parse results that are not part of the current parsing context This is only applicable to subcommand parsing operations

Returns: obj list

Type something to start searching.