C# 클래스 Crisis.CommandLine.UsageInfo

Represents the properties of a CommandLineManagerAttribute (or rather the object to which its applied) that describe the command line syntax.
This class is the only way to programatically set usage descriptions, group names and similar, which is required if globalization of the usage description is desired. Users can not instantiate objects of this class, but they are retrieved by the CommandLineParser.UsageInfo property.
파일 보기 프로젝트 열기: teeknofil/Crisis-Wordlist-Generator 1 사용 예제들

공개 메소드들

메소드 설명
GetErrorsAsString ( int width ) : string

Gets the list of errors as a formatted string.

GetGroup ( string id ) : OptionGroupInfo

Gets the option group with the specified id.

GetHeaderAsString ( int width ) : string

Gets a string consisting of the program name, version and copyright notice.

This string is suitable for printing as the first output of a console application.

GetOption ( string name ) : OptionInfo

Gets the option with the specified name.

GetOptionsAsString ( int width ) : string

Gets a formatted string describing the options and groups available.

GetOptionsAsString ( int nameColumnWidth, int descriptionColumnWidth ) : string

Gets a string describing all the options of this option manager. Usable for displaying as a help message to the user, provided that descriptions for all options and groups are provided.

ToString ( ) : string

Returns a that represents the current .

This is equivalent to calling ToString(78)

ToString ( int width ) : string

Converts this UsageInfo instance to a string.

ToString ( int width, bool includeErrors ) : string

Converts this UsageInfo instance to a string.

비공개 메소드들

메소드 설명
UsageInfo ( IOption>.SCG options, OptionStyles optionStyles, CommandLineParser parser ) : System

Initializes a new instance of the UsageInfo class.

메소드 상세

GetErrorsAsString() 공개 메소드

Gets the list of errors as a formatted string.
public GetErrorsAsString ( int width ) : string
width int The width of the field in which to format the error list.
리턴 string

GetGroup() 공개 메소드

Gets the option group with the specified id.
public GetGroup ( string id ) : OptionGroupInfo
id string The id of the option group to retrieve.
리턴 OptionGroupInfo

GetHeaderAsString() 공개 메소드

Gets a string consisting of the program name, version and copyright notice.
This string is suitable for printing as the first output of a console application.
public GetHeaderAsString ( int width ) : string
width int The total width in characters in which the string should be fitted
리턴 string

GetOption() 공개 메소드

Gets the option with the specified name.
public GetOption ( string name ) : OptionInfo
name string The name of the option to retrieve.
리턴 OptionInfo

GetOptionsAsString() 공개 메소드

Gets a formatted string describing the options and groups available.
The specified width was too small to generate the requested list.
public GetOptionsAsString ( int width ) : string
width int The maximum width of each line in the returned string.
리턴 string

GetOptionsAsString() 공개 메소드

Gets a string describing all the options of this option manager. Usable for displaying as a help message to the user, provided that descriptions for all options and groups are provided.
public GetOptionsAsString ( int nameColumnWidth, int descriptionColumnWidth ) : string
nameColumnWidth int The width in characters of the column holding the names of the options.
descriptionColumnWidth int The width in characters of the column holding the descriptions of the options.
리턴 string

ToString() 공개 메소드

Returns a that represents the current .
This is equivalent to calling ToString(78)
public ToString ( ) : string
리턴 string

ToString() 공개 메소드

Converts this UsageInfo instance to a string.
public ToString ( int width ) : string
width int The width of the field (in characters) in which to format the usage description.
리턴 string

ToString() 공개 메소드

Converts this UsageInfo instance to a string.
public ToString ( int width, bool includeErrors ) : string
width int The width of the field (in characters) in which to format the usage description.
includeErrors bool if set to true any errors that occured during parsing the command line will be included /// in the output.
리턴 string