C# Класс Crisis.CommandLine.Option

Representation of a command line option.
Objects of this class is created by the constructor of CommandLineParser. This object is then used for setting and getting values of the option manager object used by the parser.
Наследование: IOption
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddAlias ( string alias ) : void

Adds the alias.

Option ( CommandLineOptionAttribute attribute, MemberInfo memberInfo, object cmdLineObject, ICollection optionGroups, NumberFormatInfo numberFormatInfo ) : System

Initializes a new instance of the Option class.

SetDefaultValue ( ) : void

Sets this option to its default value.

Приватные методы

Метод Описание
AppendToArray ( Array array, object value ) : Array
AppendToCollection ( object collection, object value ) : void
ConvertValueTypeForSetOperation ( object value ) : object
GetBaseType ( Type type ) : Type
GetCheckedValueForSetOperation ( object value ) : object

Gets the checked value for set operation.

IsArray ( Type type ) : bool
IsCollectionType ( Type type ) : bool
IsGenericCollectionType ( Type type ) : bool
IsNonGenericCollectionType ( Type type ) : bool
IsTypeSupported ( Type type ) : bool
SetFieldValue ( object value ) : void
SetMethodValue ( object value ) : void
SetPropertyValue ( object value ) : void

Описание методов

AddAlias() публичный Метод

Adds the alias.
public AddAlias ( string alias ) : void
alias string The alias.
Результат void

Option() публичный Метод

Initializes a new instance of the Option class.
public Option ( CommandLineOptionAttribute attribute, MemberInfo memberInfo, object cmdLineObject, ICollection optionGroups, NumberFormatInfo numberFormatInfo ) : System
attribute CommandLineOptionAttribute The attribute describing this option.
memberInfo MemberInfo The object pointing to the member to which the attribute was applied.
cmdLineObject object The command line manager object.
optionGroups ICollection A complete list of all available option groups.
numberFormatInfo NumberFormatInfo The number format info to use for parsing numerical arguments.
Результат System

SetDefaultValue() публичный Метод

Sets this option to its default value.
public SetDefaultValue ( ) : void
Результат void