Energy Core Library
Energy.Attribute.Command.OptionAttribute Class Reference

Attribute for command line option. Options may have additional one or more arguments and becomes program parameters. Default options with Count not specified will be treaten as program switches with corresponding boolean value - true if were set. More...

Inheritance diagram for Energy.Attribute.Command.OptionAttribute:
Energy.Core.Shell.Parameter< TValue >

Public Member Functions

 OptionAttribute ()
 Constructor More...
 
 OptionAttribute (string name)
 Constructor More...
 
 OptionAttribute (string name, string description)
 Constructor More...
 
 OptionAttribute (string name, int count)
 Constructor More...
 
 OptionAttribute (string name, string description, int count)
 Constructor More...
 

Public Attributes

string Name
 Option name More...
 
string Short
 Option single letter alternative, i.e. "?". More...
 
string Long
 Option long name, i.e. "help". More...
 
string Description
 Option description, prefered one line text or string identifier, i.e. "@HelpOptionDescription". More...
 
string Help
 Option help text, used in manual. More...
 
string Example
 Option usage example. More...
 
string [] Alternatives
 TODO Not sure if should be covered. Usage may be little bit confusing. More...
 
string Concat
 Concatenate multiple options with specified char, i.e. "+". Otherwise last value will be taken or error may occur. More...
 
int Count
 May be set to 1, 2 or more values to take values from argument list (for parameters). If set to 0 option is a flag (for switches). More...
 

Detailed Description

Attribute for command line option. Options may have additional one or more arguments and becomes program parameters. Default options with Count not specified will be treaten as program switches with corresponding boolean value - true if were set.

Constructor & Destructor Documentation

◆ OptionAttribute() [1/5]

Energy.Attribute.Command.OptionAttribute.OptionAttribute ( )

Constructor

◆ OptionAttribute() [2/5]

Energy.Attribute.Command.OptionAttribute.OptionAttribute ( string  name)

Constructor

Parameters
name

◆ OptionAttribute() [3/5]

Energy.Attribute.Command.OptionAttribute.OptionAttribute ( string  name,
string  description 
)

Constructor

Parameters
name
description

◆ OptionAttribute() [4/5]

Energy.Attribute.Command.OptionAttribute.OptionAttribute ( string  name,
int  count 
)

Constructor

Parameters
name
count

◆ OptionAttribute() [5/5]

Energy.Attribute.Command.OptionAttribute.OptionAttribute ( string  name,
string  description,
int  count 
)

Constructor

Parameters
name
description
count

Member Data Documentation

◆ Alternatives

string [] Energy.Attribute.Command.OptionAttribute.Alternatives

TODO Not sure if should be covered. Usage may be little bit confusing.

◆ Concat

string Energy.Attribute.Command.OptionAttribute.Concat

Concatenate multiple options with specified char, i.e. "+". Otherwise last value will be taken or error may occur.

◆ Count

int Energy.Attribute.Command.OptionAttribute.Count

May be set to 1, 2 or more values to take values from argument list (for parameters). If set to 0 option is a flag (for switches).

◆ Description

string Energy.Attribute.Command.OptionAttribute.Description

Option description, prefered one line text or string identifier, i.e. "@HelpOptionDescription".

◆ Example

string Energy.Attribute.Command.OptionAttribute.Example

Option usage example.

◆ Help

string Energy.Attribute.Command.OptionAttribute.Help

Option help text, used in manual.

◆ Long

string Energy.Attribute.Command.OptionAttribute.Long

Option long name, i.e. "help".

◆ Name

string Energy.Attribute.Command.OptionAttribute.Name

Option name

◆ Short

string Energy.Attribute.Command.OptionAttribute.Short

Option single letter alternative, i.e. "?".


The documentation for this class was generated from the following file: