Joutsen.ArgumentsParsing v0.3.0+1-ga4c84ed
Public Member Functions | Protected Member Functions | List of all members
Joutsen.ArgumentsParsing.DisplayAssemblyVersionArgument Class Reference

A parser argument that displays the version of an assembly. More...

Public Member Functions

 DisplayAssemblyVersionArgument (String flag, String alternative, Assembly assembly, String help=null)
 Creates a new instance of the argument for an assembly. More...
 
 DisplayAssemblyVersionArgument (Assembly assembly, String help=null)
 Creates a new instance of the argument for an assembly using default names. More...
 
 DisplayAssemblyVersionArgument (String flag, String alternative, Type typeFromAssembly, String help=null)
 Creates a new instance of the argument for a type belonging to the assembly containing the version information. More...
 
 DisplayAssemblyVersionArgument (Type typeFromAssembly, String help=null)
 Creates a new instance of the argument for a type belonging to the assembly containing the version information using default names. More...
 
- Public Member Functions inherited from Joutsen.ArgumentsParsing.AbstractDisplayArgument
 AbstractDisplayArgument (String name, String alternative, DisplayException displayException, String help)
 Creates a new instance. More...
 
string Usage (string name=null)
 Fetches the usage description of this argument. More...
 
string Description (string name=null, string alternative=null)
 Fetches the description of this argument. More...
 
virtual ArgumentLiteralParser GetParser ()
 Fetchs the literal parser for this argument. More...
 
object SetDefaultValue (object target, string name=null)
 Sets the default value of the argument to a target object. More...
 
virtual ParseResult Parse (ArgumentsIterator args, object target, string name=null)
 Parses the relevant argument in the list and modifies the target object with it. More...
 
string Description (string name=null, string alternative=null)
 Fetches the description of this argument. More...
 
string Usage (string name=null)
 Fetches the usage description of this argument. More...
 
ArgumentLiteralParser GetParser ()
 Fetchs the literal parser for this argument. More...
 
ParseResult Parse (ArgumentsIterator args, object target, string name=null)
 Parses the relevant argument in the list and modifies the target object with it. More...
 
void Reset ()
 Clears the parsers state if any in order to prepare it for a new run. More...
 
object SetDefaultValue (object target, string name=null)
 Sets the default value of the argument to a target object. More...
 

Protected Member Functions

 DisplayAssemblyVersionArgument (String flag, String alternative, String version, String help=null)
 Creates a new instance of the argument for a custom version string. More...
 
- Protected Member Functions inherited from Joutsen.ArgumentsParsing.AbstractDisplayArgument
virtual bool MatchesArgument (String argument)
 Checks if an input value matches the argument's name or alternative name. More...
 

Additional Inherited Members

- Protected Attributes inherited from Joutsen.ArgumentsParsing.AbstractDisplayArgument
String help
 
DisplayArgumentParser parser
 
- Properties inherited from Joutsen.ArgumentsParsing.AbstractDisplayArgument
bool IsRequired [get]
 
virtual bool IsFlag [get]
 Determines if this argument is nearly a flag (name only) or uses values. More...
 
string Name [get]
 The name that identifies the argument in the input list. More...
 
string Alternative [get]
 The alternative name that identifies the argument in the input list. More...
 
- Properties inherited from Joutsen.ArgumentsParsing.DisplayArgument
String Name [get]
 The name that identifies the argument in the input list. More...
 
String Alternative [get]
 The alternative name that identifies the argument in the input list. More...
 
- Properties inherited from Joutsen.ArgumentsParsing.ArgumentLiteralParser
ArgumentsListParser ParentParser [set]
 The list parser this literal parser belongs to. More...
 
bool IsFlag [get]
 Determines if this argument is nearly a flag (name only) or uses values. More...
 

Detailed Description

A parser argument that displays the version of an assembly.

Since
0.2.0

Constructor & Destructor Documentation

◆ DisplayAssemblyVersionArgument() [1/5]

Joutsen.ArgumentsParsing.DisplayAssemblyVersionArgument.DisplayAssemblyVersionArgument ( String  flag,
String  alternative,
Assembly  assembly,
String  help = null 
)

Creates a new instance of the argument for an assembly.

Parameters
flagthe short name or flag that identifies this argument in the input list
alternativean alternative long form of the name which can also be used to identify this argument in the input list
assemblythe assembly containing the version information
helpan optional descriptive text of the argument intended as additional information in the description of the argument

◆ DisplayAssemblyVersionArgument() [2/5]

Joutsen.ArgumentsParsing.DisplayAssemblyVersionArgument.DisplayAssemblyVersionArgument ( Assembly  assembly,
String  help = null 
)

Creates a new instance of the argument for an assembly using default names.

Parameters
assemblythe assembly containing the version information
helpan optional descriptive text of the argument intended as additional information in the description of the argument
Remarks
The argument is identified in th einput list by "-v" and "--version".

◆ DisplayAssemblyVersionArgument() [3/5]

Joutsen.ArgumentsParsing.DisplayAssemblyVersionArgument.DisplayAssemblyVersionArgument ( String  flag,
String  alternative,
Type  typeFromAssembly,
String  help = null 
)

Creates a new instance of the argument for a type belonging to the assembly containing the version information.

Parameters
flagthe short name or flag that identifies this argument in the input list
alternativean alternative long form of the name which can also be used to identify this argument in the input list
typeFromAssemblythe type which belongs to the assembly that offers the version information
helpan optional descriptive text of the argument intended as additional information in the description of the argument

◆ DisplayAssemblyVersionArgument() [4/5]

Joutsen.ArgumentsParsing.DisplayAssemblyVersionArgument.DisplayAssemblyVersionArgument ( Type  typeFromAssembly,
String  help = null 
)

Creates a new instance of the argument for a type belonging to the assembly containing the version information using default names.

Parameters
destinationthe property name of the target object which receives the parsed value
typeFromAssemblythe type which belongs to the assembly that offers the version information
helpan optional descriptive text of the argument intended as additional information in the description of the argument
Remarks
The argument is identified in th einput list by "-v" and "--version".

◆ DisplayAssemblyVersionArgument() [5/5]

Joutsen.ArgumentsParsing.DisplayAssemblyVersionArgument.DisplayAssemblyVersionArgument ( String  flag,
String  alternative,
String  version,
String  help = null 
)
protected

Creates a new instance of the argument for a custom version string.

Parameters
flagthe short name or flag that identifies this argument in the input list
alternativean alternative long form of the name which can also be used to identify this argument in the input list
Version
the version string to display
Parameters
helpan optional descriptive text of the argument intended as additional information in the description of the argument