OpenTAP 9.25
API Reference
Public Member Functions | Properties | List of all members
OpenTap.Cli.CommandLineArgumentAttribute Class Reference

When used on a property inside a ICliAction, this attribute indicates a command line arugment or switch. More...

Inherits Attribute.

Public Member Functions

 CommandLineArgumentAttribute (string name)
 Primary constructor. More...
 

Properties

string Name [get]
 Indicates the long name of the command line argument.
 
string ShortName [getset]
 Indicates the short name of the argument. This should be 1 character.
 
string Description [getset]
 Human readable description of the argument.
 
bool Visible = true [getset]
 Indicates whether this will be shown when writing CLI usage information.
 

Detailed Description

When used on a property inside a ICliAction, this attribute indicates a command line arugment or switch.

The property type can be: bool, string, or string[]. If it's bool the argument will not take an argument, but will instead set the property to true. If it's a string the value of the property will be set to the first occuring value set in the CLI arguments. If it's a string[] all values set in the CLI arguments will be concatenated into an array.

Constructor & Destructor Documentation

◆ CommandLineArgumentAttribute()

OpenTap.Cli.CommandLineArgumentAttribute.CommandLineArgumentAttribute ( string  name)
inline

Primary constructor.

Parameters
nameLong name of the argument.

OpenTAP 9.25 API built Tue Aug 6 2024 07:49:25