C# 클래스 Crisis.CommandLine.OptionStyleManager

Utility class for manipulating OptionStyles.
파일 보기 프로젝트 열기: teeknofil/Crisis-Wordlist-Generator 1 사용 예제들

공개 메소드들

메소드 설명
GetPrefix ( OptionStyles optionStyle, string optionName ) : string

Gets the switch character used to specify an option of the specified style on the command line.

If optionStyle includes several option styles, the switch for the most specific one representing a single option style prefix is returned. The switches for the corresponding styles are as follows (in order from most specific to least):

OptionStyle Prefix All + Plus + Group - ShortUnix - File @ LongUnix -- Windows / (Items in italics does not represent a single unique prefix)

IsAllEnabled ( OptionStyles optionStyle, OptionStyles flags ) : bool

Determines whether all of the specified flags are enabled in the specified optionStyle.

IsAnyEnabled ( OptionStyles optionStyle, OptionStyles flags ) : bool

Determines whether any of the specified flags are enabled in the specified optionStyle.

IsValid ( OptionStyles optionStyle ) : bool

Determines whether the specified option style is valid.

An option style is invalid if the OptionStyles.ShortUnix flag is not enabled, but the OptionStyles.Group or OptionStyles.Plus is. This normally doesn't occur if you only use the binary or to combine flags however, since the values of the group and plus options also include the short unix style.

PrefixOptionForDescription ( OptionStyles optionStyle, string optionName ) : string

Prefixes the option name with the prefix(es) with which it should be used.

This method always prefers prefixing options with unix style to windows style prefixes if both are enabled. If OptionStyles.Plus is enabled, the option will be prefixed with "[+|-]" to indicate that either prefix may be used.

메소드 상세

GetPrefix() 공개 정적인 메소드

Gets the switch character used to specify an option of the specified style on the command line.

If optionStyle includes several option styles, the switch for the most specific one representing a single option style prefix is returned. The switches for the corresponding styles are as follows (in order from most specific to least):

OptionStyle Prefix All + Plus + Group - ShortUnix - File @ LongUnix -- Windows / (Items in italics does not represent a single unique prefix)

public static GetPrefix ( OptionStyles optionStyle, string optionName ) : string
optionStyle OptionStyles The option style.
optionName string The name of the option.
리턴 string

IsAllEnabled() 공개 정적인 메소드

Determines whether all of the specified flags are enabled in the specified optionStyle.
public static IsAllEnabled ( OptionStyles optionStyle, OptionStyles flags ) : bool
optionStyle OptionStyles The option style.
flags OptionStyles The flags.
리턴 bool

IsAnyEnabled() 공개 정적인 메소드

Determines whether any of the specified flags are enabled in the specified optionStyle.
public static IsAnyEnabled ( OptionStyles optionStyle, OptionStyles flags ) : bool
optionStyle OptionStyles The option style.
flags OptionStyles The flags.
리턴 bool

IsValid() 공개 정적인 메소드

Determines whether the specified option style is valid.
An option style is invalid if the OptionStyles.ShortUnix flag is not enabled, but the OptionStyles.Group or OptionStyles.Plus is. This normally doesn't occur if you only use the binary or to combine flags however, since the values of the group and plus options also include the short unix style.
public static IsValid ( OptionStyles optionStyle ) : bool
optionStyle OptionStyles The option style.
리턴 bool

PrefixOptionForDescription() 공개 정적인 메소드

Prefixes the option name with the prefix(es) with which it should be used.
This method always prefers prefixing options with unix style to windows style prefixes if both are enabled. If OptionStyles.Plus is enabled, the option will be prefixed with "[+|-]" to indicate that either prefix may be used.
public static PrefixOptionForDescription ( OptionStyles optionStyle, string optionName ) : string
optionStyle OptionStyles The option style.
optionName string Name of the option.
리턴 string