C# 클래스 Westwind.Utilities.System.CommandLineParser

Basic Command Line Parser class that can deal with simple switch based command line arguments supports: FirstParm (first commandline argume -pString or -p"String" -f switch/flag parameters
파일 보기 프로젝트 열기: RickStrahl/AspNetFrameworksPerformance

공개 메소드들

메소드 설명
CommandLineParser ( ) : System
Parse ( ) : void

Override to provide parse switches\parameter into object structure

보호된 메소드들

메소드 설명
ParseParameterSwitch ( string parm ) : bool
ParseStringParameterSwitch ( string parm, string defaultValue = null ) : string

Parses a string Parameter switch in the format of: -p"c:\temp files\somefile.txt" -pc:\somefile.txt Note no spaces are allowed between swich and value.

메소드 상세

CommandLineParser() 공개 메소드

public CommandLineParser ( ) : System
리턴 System

Parse() 공개 추상적인 메소드

Override to provide parse switches\parameter into object structure
public abstract Parse ( ) : void
리턴 void

ParseParameterSwitch() 보호된 메소드

protected ParseParameterSwitch ( string parm ) : bool
parm string
리턴 bool

ParseStringParameterSwitch() 보호된 메소드

Parses a string Parameter switch in the format of: -p"c:\temp files\somefile.txt" -pc:\somefile.txt Note no spaces are allowed between swich and value.
protected ParseStringParameterSwitch ( string parm, string defaultValue = null ) : string
parm string parameter switch key
defaultValue string value returned if switch is not found
리턴 string