C# Class 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
Afficher le fichier Open project: RickStrahl/AspNetFrameworksPerformance

Méthodes publiques

Méthode Description
CommandLineParser ( ) : System
Parse ( ) : void

Override to provide parse switches\parameter into object structure

Méthodes protégées

Méthode Description
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.

Method Details

CommandLineParser() public méthode

public CommandLineParser ( ) : System
Résultat System

Parse() public abstract méthode

Override to provide parse switches\parameter into object structure
public abstract Parse ( ) : void
Résultat void

ParseParameterSwitch() protected méthode

protected ParseParameterSwitch ( string parm ) : bool
parm string
Résultat bool

ParseStringParameterSwitch() protected méthode

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
Résultat string