StauffConsulting.Essentials.| C#: |
public abstract class Switch :
object
|
| VB: |
Public MustInherit Class Switch
Inherits Object
|
| Type Ancestry: | Object |
| Derived Types: | SimpleSwitch HelpSwitch StringSwitch IntSwitch DecimalSwitch DateTimeSwitch StringListSwitch IntListSwitch EnumSwitchBase |
Switch |
Constructor. |
protected | string |
_help |
|
static | ArrayList |
AllSwitches |
Whenever a switch is instantiated, it is added to this list. |
| bool |
Found |
Tells whether the switch was found in the command line. |
readonly | string |
Name |
The name of the switch, including the initial hyphen. |
readonly | string |
NameLC |
The name of the switch in lower case. |
readonly | bool |
Required |
Is this switch required? |
readonly | string |
ValueHelp |
Describes the type of value expected by the switch (if any). |
| string |
Help |
Help for the switch. |
Parse |
Tries to parse the next thing from the argument list. This is for internal use only by CmdLineParser. |
WriteHelp |
Displays help for the switch. |
| C#: |
protected private Switch (string name,
string valueHelp,
bool required,
string help)
|
| VB: |
Protected Private Sub New(ByVal name As String, ByVal valueHelp As String, ByVal required As Boolean, ByVal help As String)
|
Parameters
name | the name of the switch; if it doesn't start with a hyphen. one is prepended. |
valueHelp | describes the type of value expected by the switch (if any). |
required | is this switch required? |
help | a description of the switch. |
| C#: |
protected string _help;
|
| VB: |
Protected _help As String
|
| C#: |
readonly static System.Collections.ArrayList AllSwitches;
|
| VB: |
ReadOnly Shared AllSwitches As System.Collections.ArrayList
|
| C#: |
bool Found;
|
| VB: |
Found As Boolean
|
| C#: |
readonly string Name;
|
| VB: |
ReadOnly Name As String
|
| C#: |
readonly string NameLC;
|
| VB: |
ReadOnly NameLC As String
|
| C#: |
readonly bool Required;
|
| VB: |
ReadOnly Required As Boolean
|
| C#: |
readonly string ValueHelp;
|
| VB: |
ReadOnly ValueHelp As String
|
| C#: |
string Help
|
| VB: |
Property Help() As String
|
Help for the switch.
| C#: |
static Void Parse(StauffConsulting.Essentials.CmdLineParser p,
System.Collections.ArrayList argList)
|
| VB: |
Shared Function Parse(ByVal p As StauffConsulting.Essentials.CmdLineParser, ByVal argList As System.Collections.ArrayList) As Void
|
Parameters
p | |
argList |
| C#: |
Void WriteHelp(System.IO.TextWriter tw,
int width)
|
| VB: |
Function WriteHelp(ByVal tw As System.IO.TextWriter, ByVal width As Integer) As Void
|
Parameters
tw | where to write it |
width | the width of the display in characters |