Models the heading part of an help text. You can assign it where you assign any System.String instance.
More...
|
| HeadingInfo (string programName) |
| Initializes a new instance of the CommandLine.Text.HeadingInfo class specifying program name. More...
|
|
| HeadingInfo (string programName, string version) |
| Initializes a new instance of the CommandLine.Text.HeadingInfo class specifying program name and version. More...
|
|
override string | ToString () |
| Returns the heading as a System.String. More...
|
|
void | WriteMessage (string message, TextWriter writer) |
| Writes out a string and a new line using the program name specified in the constructor and message parameter. More...
|
|
void | WriteMessage (string message) |
| Writes out a string and a new line using the program name specified in the constructor and message parameter to standard output stream. More...
|
|
void | WriteError (string message) |
| Writes out a string and a new line using the program name specified in the constructor and message parameter to standard error stream. More...
|
|
|
static HeadingInfo | Default [get] |
| Gets the default heading instance. The title is retrieved from AssemblyTitleAttribute, or the assembly short name if its not defined. The version is retrieved from AssemblyInformationalVersionAttribute, or the assembly version if its not defined. More...
|
|
Models the heading part of an help text. You can assign it where you assign any System.String instance.
CommandLine.Text.HeadingInfo.HeadingInfo |
( |
string |
programName | ) |
|
|
inline |
Initializes a new instance of the CommandLine.Text.HeadingInfo class specifying program name.
- Parameters
-
programName | The name of the program. |
- Exceptions
-
System.ArgumentException | Thrown when parameter programName is null or empty string. |
CommandLine.Text.HeadingInfo.HeadingInfo |
( |
string |
programName, |
|
|
string |
version |
|
) |
| |
|
inline |
Initializes a new instance of the CommandLine.Text.HeadingInfo class specifying program name and version.
- Parameters
-
programName | The name of the program. |
version | The version of the program. |
- Exceptions
-
System.ArgumentException | Thrown when parameter programName is null or empty string. |
static implicit CommandLine.Text.HeadingInfo.operator string |
( |
HeadingInfo |
info | ) |
|
|
inlinestatic |
Converts the heading to a System.String.
- Parameters
-
- Returns
- The System.String that contains the heading.
override string CommandLine.Text.HeadingInfo.ToString |
( |
| ) |
|
|
inline |
Returns the heading as a System.String.
- Returns
- The System.String that contains the heading.
void CommandLine.Text.HeadingInfo.WriteError |
( |
string |
message | ) |
|
|
inline |
Writes out a string and a new line using the program name specified in the constructor and message parameter to standard error stream.
- Parameters
-
message | The System.String message to write. |
- Exceptions
-
System.ArgumentException | Thrown when parameter message is null or empty string. |
void CommandLine.Text.HeadingInfo.WriteMessage |
( |
string |
message, |
|
|
TextWriter |
writer |
|
) |
| |
|
inline |
Writes out a string and a new line using the program name specified in the constructor and message parameter.
- Parameters
-
message | The System.String message to write. |
writer | The target System.IO.TextWriter derived type. |
- Exceptions
-
System.ArgumentException | Thrown when parameter message is null or empty string. |
System.ArgumentNullException | Thrown when parameter writer is null. |
void CommandLine.Text.HeadingInfo.WriteMessage |
( |
string |
message | ) |
|
|
inline |
Writes out a string and a new line using the program name specified in the constructor and message parameter to standard output stream.
- Parameters
-
message | The System.String message to write. |
- Exceptions
-
System.ArgumentException | Thrown when parameter message is null or empty string. |
Gets the default heading instance. The title is retrieved from AssemblyTitleAttribute, or the assembly short name if its not defined. The version is retrieved from AssemblyInformationalVersionAttribute, or the assembly version if its not defined.
The documentation for this class was generated from the following file:
- src/CommandLine/Text/HeadingInfo.cs