Table of Contents

CliOptionAttribute.Arity Property

Definition

Namespace
DotMake.CommandLine
Assembly
DotMake.CommandLine.dll

Gets or sets the arity of the option's argument. The arity refers to the number of values that can be passed on the command line.

In most cases setting argument arity is not necessary as it is automatically determined based on the argument type (the decorated property's type):

  • Boolean -> ArgumentArity.ZeroOrOne
  • Collection types -> ArgumentArity.ZeroOrMore
  • Everything else -> ArgumentArity.ExactlyOne
public CliArgumentArity Arity { get; set; }

Property Value

CliArgumentArity