Метод | Описание | |
---|---|---|
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): |
|
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. |
public static GetPrefix ( OptionStyles optionStyle, string optionName ) : string | ||
optionStyle | OptionStyles | The option style. |
optionName | string | The name of the option. |
Результат | string |
public static IsAllEnabled ( OptionStyles optionStyle, OptionStyles flags ) : bool | ||
optionStyle | OptionStyles | The option style. |
flags | OptionStyles | The flags. |
Результат | bool |
public static IsAnyEnabled ( OptionStyles optionStyle, OptionStyles flags ) : bool | ||
optionStyle | OptionStyles | The option style. |
flags | OptionStyles | The flags. |
Результат | bool |
public static IsValid ( OptionStyles optionStyle ) : bool | ||
optionStyle | OptionStyles | The option style. |
Результат | bool |
public static PrefixOptionForDescription ( OptionStyles optionStyle, string optionName ) : string | ||
optionStyle | OptionStyles | The option style. |
optionName | string | Name of the option. |
Результат | string |