Header menu logo Argu

ArguAttributes Module

Argu Attribute declaration module

Types

Type Description

AltCommandLineAttribute

Declares a set of secondary CLI identifiers for the current parameter. Does not replace the default identifier which is either auto-generated or specified by the CustomCommandLine attribute.

AppSettingsSeparatorAttribute

Specify a custom value separator in AppSettings parsing parameters. Used in CSV or list-based parameter parsing.

CliPositionAttribute

Declares that argument should be placed at specific position.

CliPrefixAttribute

Specifies a custom prefix for auto-generated CLI names. This defaults to double dash ('--').

ColonAssignmentAttribute

Use '--param:arg' or '--param key:value' assignment syntax in CLI. Requires that the argument should have parameters of arity 1 or 2 only.

ColonAssignmentOrSpacedAttribute

Use '--param:arg' assignment syntax in CLI. Parameters can also be assigned using space as separator e.g. '--param arg' Requires that the argument should have parameters of arity 1 only.

CustomAppSettingsAttribute

Declares a custom key identifier for the current parameter in AppSettings parsing. Replaces the auto-generated identifier name.

CustomAssignmentAttribute

Use a custom separator for parameter assignment. e.g. '--paramarg' or '--param keyvalue'. Requires that the argument should have parameters of arity 1 or 2 only. Can be used to specify any assignment separator.

CustomAssignmentOrSpacedAttribute

Use a custom separator for parameter assignment. e.g. '--paramarg' Parameters can also be assigned using space as separator e.g. '--param arg' Requires that the argument should have parameters of arity 1 only. Can be used to specify any assignment separator.

CustomCommandLineAttribute

Declares a custom default CLI identifier for the current parameter. Replaces the auto-generated identifier name.

DisableHelpFlagsAttribute

Specifies that Help/Usage switches should be disabled for the CLI.

EqualsAssignmentAttribute

Use '--param=arg' or '--param key=value' assignment syntax in CLI. Requires that the argument should have parameters of arity 1 or 2 only.

EqualsAssignmentOrSpacedAttribute

Use '--param=arg' assignment syntax in CLI. Parameters can also be assigned using space as separator e.g. '--param arg' Requires that the argument should have parameters of arity 1 only.

ExactlyOnceAttribute

Demands that the argument should be specified exactly once; a parse exception is raised otherwise. Equivalent to attaching both the Mandatory and Unique attribute on the parameter.

FirstAttribute

Declares that argument can only be placed at the beginning of the CLI syntax. A parse exception will be raised if that is not the case.

GatherAllSourcesAttribute

Requires that CLI parameters should not override AppSettings parameters. Will return parsed results from both AppSettings and CLI.

GatherUnrecognizedAttribute

Denotes that the given argument should accumulate any unrecognized arguments it encounters. Must contain a single field of type string

HelpDescriptionAttribute

Specifies a custom description text for the Help/Usage switches in the usage string.

HelpFlagsAttribute

Specifies a custom set of Help/Usage switches for the CLI.

HiddenAttribute

Hides argument from command line argument usage string.

InheritAttribute

Denotes that the given argument should be inherited in the scope of any subcommands.

LastAttribute

Declares that argument can only be placed at the end of the CLI syntax. A parse exception will be raised if that is not the case.

MainCommandAttribute

Declares that argument is the main command of the CLI syntax. Arguments are specified without requiring a switch.

MandatoryAttribute

Demands at least one parsed result for this argument; a parse exception is raised otherwise.

NoAppSettingsAttribute

Disable AppSettings parsing for this branch. Use for CLI parsing only.

NoCommandLineAttribute

Disable CLI parsing for this argument. Use for AppSettings parsing only.

RequireSubcommandAttribute

Demands that at least one subcommand is specified in the CLI; a parse exception is raised otherwise.

SubCommandAttribute

Declares that argument is a subcommand. A parse exception will be raised if the argument has parameters and their type is not ParseResults<_>. Implicit if the argument does have a parameter of type ParseResults<_>.

UniqueAttribute

Demands that the argument should be specified at most once; a parse exception is raised otherwise.

Type something to start searching.