Argu


ParseResults<'Template>

Namespace: Argu

Argument parsing result holder.

Instance members

Instance memberDescription
Catch(f, errorCode, showUsage)
Signature: (f:(unit -> 'T) * errorCode:ErrorCode option * showUsage:bool option) -> 'T

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

Contains(expr, source)
Signature: (expr:Expr<('Fields -> 'Template)> * source:ParseSource option) -> bool

Checks if parameter of specific kind has been specified.

Contains(expr, source)
Signature: (expr:Expr<'Template> * source:ParseSource option) -> bool

Checks if parameter of specific kind has been specified.

ErrorHandler
Signature: IExiter

CompiledName: get_ErrorHandler

GetAllResults(source)
Signature: (source:ParseSource option) -> 'Template list

Gets all parse results.

GetResult(expr, defaultValue, source)
Signature: (expr:Expr<('Fields -> 'Template)> * defaultValue:'Fields option * source:ParseSource option) -> 'Fields

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

GetResult(expr, defaultValue, source)
Signature: (expr:Expr<'Template> * defaultValue:'Template option * source:ParseSource option) -> 'Template

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

GetResults(expr, source)
Signature: (expr:Expr<('Fields -> 'Template)> * source:ParseSource option) -> 'Fields list

Query parse results for argument with parameters.

GetResults(expr, source)
Signature: (expr:Expr<'Template> * source:ParseSource option) -> 'Template list

Query parse results for parameterless argument.

GetSubCommand()
Signature: unit -> 'Template

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

IsUsageRequested
Signature: bool

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

CompiledName: get_IsUsageRequested

IterResult(expr, iterator, source)
Signature: (expr:Expr<('Field -> 'Template)> * iterator:('Field -> unit) * source:ParseSource option) -> unit

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.

IterResults(expr, iterator, source)
Signature: (expr:Expr<('Field -> 'Template)> * iterator:('Field -> unit) * source:ParseSource option) -> unit

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.

PostProcessResult(expr, parser, source)
Signature: (expr:Expr<('Field -> 'Template)> * parser:('Field -> 'R) * source:ParseSource option) -> 'R
Type parameters: '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.

PostProcessResults(expr, parser, source)
Signature: (expr:Expr<('Field -> 'Template)> * parser:('Field -> 'R) * source:ParseSource option) -> 'R list
Type parameters: 'R

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.

Raise(error, errorCode, showUsage)
Signature: (error:exn * errorCode:ErrorCode option * showUsage:bool option) -> 'T

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

Raise(msg, errorCode, showUsage)
Signature: (msg:string * errorCode:ErrorCode option * showUsage:bool option) -> 'T

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

TryGetResult(expr, source)
Signature: (expr:Expr<('Fields -> 'Template)> * source:ParseSource option) -> 'Fields option

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

TryGetResult(expr, source)
Signature: (expr:Expr<'Template> * source:ParseSource option) -> 'Template option

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

TryGetSubCommand()
Signature: unit -> 'Template option

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

TryPostProcessResult(...)
Signature: (expr:Expr<('Field -> 'Template)> * parser:('Field -> 'R) * source:ParseSource option) -> 'R option
Type parameters: '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.

UnrecognizedCliParams
Signature: string list

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

CompiledName: get_UnrecognizedCliParams

UnrecognizedCliParseResults
Signature: obj list

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

CompiledName: get_UnrecognizedCliParseResults

Fork me on GitHub