Joutsen.ArgumentsParsing  v0.2.1
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Joutsen.ArgumentsParsing.AssemblyVersionArgument Class Reference

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

Public Member Functions

 AssemblyVersionArgument (String flag, String alternative, String destination, Assembly assembly, String help=null)
 Creates a new instance of the argument for an assembly. More...
 
 AssemblyVersionArgument (String destination, Assembly assembly, String help=null)
 Creates a new instance of the argument for an assembly using default names. More...
 
 AssemblyVersionArgument (String flag, String alternative, String destination, Type typeFromAssembly, String help=null)
 Creates a new instance of the argument for a type belonging to the assembly containing the version information. More...
 
 AssemblyVersionArgument (String destination, 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.FlagArgument< String >
 FlagArgument (String flag, String alternative, String destination, TValueType parsedValue, TValueType unparsedValue=default(TValueType), String help=null)
 Creates a new instance of the argument. More...
 
 FlagArgument (String flag, String alternative, String destination, bool value=true, String help=null)
 Creates a new instance of the argument. More...
 
override string Description (string name=null, string alternative=null)
 
override string Usage (string name=null)
 

Static Public Member Functions

static AssemblyVersionArgument Create< TargetType > (String flag, String alternative, Expression< Func< TargetType, String >> destination, Assembly assembly, String help=null)
 
static AssemblyVersionArgument Create< TargetType > (Expression< Func< TargetType, String >> destination, Assembly assembly, String help=null)
 Creates a new instance of the AssemblyVersionArgument for an assembly. More...
 
static AssemblyVersionArgument Create< TargetType > (String flag, String alternative, Expression< Func< TargetType, String >> destination, Type typeFromAssembly, String help=null)
 Creates a new instance of the AssemblyVersionArgument for a type belonging to the assembly containing the version information using default names. More...
 
static AssemblyVersionArgument Create< TargetType > (Expression< Func< TargetType, String >> destination, Type typeFromAssembly, String help=null)
 Creates a new instance of the AssemblyVersionArgument for a type belonging to the assembly containing the version information using default names. More...
 
- Static Public Member Functions inherited from Joutsen.ArgumentsParsing.FlagArgument< String >
static FlagArgument< ValueType > Create< TargetType, ValueType > (String flag, String alternative, Expression< Func< TargetType, ValueType >> destination, ValueType parsedValue, ValueType unparsedValue=default(ValueType), string help=null)
 Creates a new instance of the typed FlagArgument. More...
 
static FlagArgument Create< TargetType > (String flag, String alternative, Expression< Func< TargetType, bool >> destination=null, bool value=true, string help=null)
 Creates a new instance of the FlagArgument. More...
 

Protected Member Functions

 AssemblyVersionArgument (String flag, String alternative, String destination, String version, String help=null)
 Creates a new instance of the AssemblyVersionArgument for an assembly. More...
 

Additional Inherited Members

- Properties inherited from Joutsen.ArgumentsParsing.FlagArgument< String >
string Alternative [get]
 The alternative name that is usually a longer version of the flag as it appears in the input list. More...
 

Detailed Description

A parser argument that determines the version of an assembly.

Remarks
The version of an assembly is always a represented by a Version object. For an argument providing a descriptive string instead see AssemblyInformationalVersionArgument.
Since
0.2.0

Constructor & Destructor Documentation

◆ AssemblyVersionArgument() [1/5]

Joutsen.ArgumentsParsing.AssemblyVersionArgument.AssemblyVersionArgument ( String  flag,
String  alternative,
String  destination,
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
destinationthe property name of the target object which receives the parsed value
assemblythe assembly containing the version information
helpan optional descriptive text of the argument intended as additional information in the description of the argument

◆ AssemblyVersionArgument() [2/5]

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

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

Parameters
destinationthe property name of the target object which receives the parsed value
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".

◆ AssemblyVersionArgument() [3/5]

Joutsen.ArgumentsParsing.AssemblyVersionArgument.AssemblyVersionArgument ( String  flag,
String  alternative,
String  destination,
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
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

◆ AssemblyVersionArgument() [4/5]

Joutsen.ArgumentsParsing.AssemblyVersionArgument.AssemblyVersionArgument ( String  destination,
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".

◆ AssemblyVersionArgument() [5/5]

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

Creates a new instance of the AssemblyVersionArgument for an assembly.

Template Parameters
TargetTypethe type of the target object that will receive the parsed values
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
destinationan expression describing the property of the target instance which shall recieve the parsed value. If this is null the target property will be found using the name of the argument.
assemblythe assembly containing the version information
helpan optional descriptive text of the argument intended as additional information in the description of the argument

Member Function Documentation

◆ Create< TargetType >() [1/4]

static AssemblyVersionArgument Joutsen.ArgumentsParsing.AssemblyVersionArgument.Create< TargetType > ( String  flag,
String  alternative,
Expression< Func< TargetType, String >>  destination,
Assembly  assembly,
String  help = null 
)
static

◆ Create< TargetType >() [2/4]

static AssemblyVersionArgument Joutsen.ArgumentsParsing.AssemblyVersionArgument.Create< TargetType > ( Expression< Func< TargetType, String >>  destination,
Assembly  assembly,
String  help = null 
)
static

Creates a new instance of the AssemblyVersionArgument for an assembly.

Template Parameters
TargetTypethe type of the target object that will receive the parsed values
Parameters
destinationan expression describing the property of the target instance which shall recieve the parsed value. If this is null the target property will be found using the name of the argument.
assemblythe assembly containing the version information
helpan optional descriptive text of the argument intended as additional information in the description of the argument

◆ Create< TargetType >() [3/4]

static AssemblyVersionArgument Joutsen.ArgumentsParsing.AssemblyVersionArgument.Create< TargetType > ( String  flag,
String  alternative,
Expression< Func< TargetType, String >>  destination,
Type  typeFromAssembly,
String  help = null 
)
static

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

Template Parameters
TargetTypethe type of the target object that will receive the parsed values
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
destinationan expression describing the property of the target instance which shall recieve the parsed value. If this is null the target property will be found using the name of the argument.
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 the input list by "-v" and "--version".

◆ Create< TargetType >() [4/4]

static AssemblyVersionArgument Joutsen.ArgumentsParsing.AssemblyVersionArgument.Create< TargetType > ( Expression< Func< TargetType, String >>  destination,
Type  typeFromAssembly,
String  help = null 
)
static

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

Template Parameters
TargetTypethe type of the target object that will receive the parsed values
Parameters
destinationan expression describing the property of the target instance which shall recieve the parsed value. If this is null the target property will be found using the name of the argument.
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 the input list by "-v" and "--version".