C# Class NAnt.Core.Util.CommandLineParser

Commandline parser.
显示文件 Open project: skolima/NAnt Class Usage Examples

Public Methods

Method Description
CommandLineParser ( Type argumentSpecification, bool supportsResponseFile ) : System

Initializes a new instance of the CommandLineParser class using possible arguments deducted from the specific Type.

Parse ( string args, object destination ) : void

Parses an argument list.

Private Methods

Method Description
GetCommandLineAttribute ( PropertyInfo propertyInfo ) : NAnt.Core.Util.CommandLineArgumentAttribute

Returns the CommandLineArgumentAttribute that's applied on the specified property.

IsDelimiter ( char c, char delimiters ) : bool
ParseArgumentList ( string args ) : void

Parse the argument list using the

ParseArguments ( string sourceString, char delimiters ) : string[]

Splits a string and removes any empty strings from the result. Same functionality as the public string[] Split(char[] separator, StringSplitOptions options) method in .Net 2.0. Replace with that call when 2.0 is standard.

ProcessResponseFile ( string file ) : void

Read a response file and parse the arguments as usual.

Method Details

CommandLineParser() public method

Initializes a new instance of the CommandLineParser class using possible arguments deducted from the specific Type.
is a null reference.
public CommandLineParser ( Type argumentSpecification, bool supportsResponseFile ) : System
argumentSpecification System.Type The from which the possible command-line arguments should be retrieved.
supportsResponseFile bool A value indicating whether or not a response file is able to be used.
return System

Parse() public method

Parses an argument list.
is a null reference. The of does not match the argument specification that was used to initialize the parser.
public Parse ( string args, object destination ) : void
args string The arguments to parse.
destination object The destination object on which properties will be set corresponding to the specified arguments.
return void