C# 클래스 PowerArgs.CommandLineAction

A class that represents command line actions that users can specify on the command line. This is useful for programs like git where users first specify an action like 'push' and then the remaining arguments are either global or specific to 'push'.
파일 보기 프로젝트 열기: adamabdelhamed/PowerArgs 1 사용 예제들

Private Properties

프로퍼티 타입 설명
CommandLineAction System
Create CommandLineAction
Create CommandLineAction
IsActionImplementation bool
IsActionImplementation bool
IsMatch bool
MakeUsageSummary string
PopulateArguments object

공개 메소드들

메소드 설명
CommandLineAction ( Action actionHandler ) : System

Creates a new command line action given an implementation.

Equals ( object obj ) : bool

Determines if 2 actions are the same based on their source.

FindMatchingArgument ( string key, bool throwIfMoreThanOneMatch = false ) : CommandLineArgument

Finds the first CommandLineArgument that matches the given key.

ToString ( ) : string

Gets a string representation of this action.

비공개 메소드들

메소드 설명
CommandLineAction ( ) : System
Create ( MethodInfo actionMethod, List knownAliases ) : CommandLineAction
Create ( PropertyInfo actionProperty, List knownAliases ) : CommandLineAction
IsActionImplementation ( MethodInfo method ) : bool
IsActionImplementation ( PropertyInfo property ) : bool
IsMatch ( string actionString ) : bool
MakeUsageSummary ( bool htmlEncodeBrackets = false ) : string
PopulateArguments ( object parent, object &parameters ) : object

메소드 상세

CommandLineAction() 공개 메소드

Creates a new command line action given an implementation.
public CommandLineAction ( Action actionHandler ) : System
actionHandler Action The implementation of the action.
리턴 System

Equals() 공개 메소드

Determines if 2 actions are the same based on their source.
public Equals ( object obj ) : bool
obj object The other action
리턴 bool

FindMatchingArgument() 공개 메소드

Finds the first CommandLineArgument that matches the given key.
public FindMatchingArgument ( string key, bool throwIfMoreThanOneMatch = false ) : CommandLineArgument
key string The key as if it was typed in on the command line. This can also be an alias.
throwIfMoreThanOneMatch bool If set to true then this method will throw and InvalidArgDeginitionException if more than 1 match is found
리턴 CommandLineArgument

ToString() 공개 메소드

Gets a string representation of this action.
public ToString ( ) : string
리턴 string