C# Class OpenStory.Common.ParameterList

Exibir arquivo Open project: shoftee/OpenStory

Public Methods

Method Description
FromEnvironment ( ) : ParameterList

Gets the parameter list from the Environment.CommandLine variable.

FromEnvironment ( string &error ) : ParameterList

Gets the parameter list from the Environment.CommandLine variable.

Parse ( string parameterString ) : ParameterList

Gets the parameter list from the provided string.

Parse ( string parameterString, string &error ) : ParameterList

Gets the parameter list from the provided string.

ToArgumentList ( ) : string[]

Constructs a string array parameter list.

This is useful when you need to use the list with the .NET methods to execute a process.

this ( string key ) : string

Gets the value of a parameter.

Private Methods

Method Description
ParameterList ( string>.IDictionary parameters ) : System

Initializes a new instance of the ParameterList class.

ParseInitial ( string parameterString ) : string>.Dictionary

Parses the parameters from a provided parameter string.

The Environment.CommandLine property is useful for this.

ParseParameters ( string>.IDictionary parameters ) : string>.Dictionary
ParseParameters ( string>.IDictionary parameters, string &error ) : string>.Dictionary

Method Details

FromEnvironment() public static method

Gets the parameter list from the Environment.CommandLine variable.
Thrown if the provided parameter list has an invalid format.
public static FromEnvironment ( ) : ParameterList
return ParameterList

FromEnvironment() public static method

Gets the parameter list from the Environment.CommandLine variable.
public static FromEnvironment ( string &error ) : ParameterList
error string A variable to hold any error messages.
return ParameterList

Parse() public static method

Gets the parameter list from the provided string.
Thrown if the provided parameter list has an invalid format.
public static Parse ( string parameterString ) : ParameterList
parameterString string The string that contains the parameter information.
return ParameterList

Parse() public static method

Gets the parameter list from the provided string.
public static Parse ( string parameterString, string &error ) : ParameterList
parameterString string The string that contains the parameter information.
error string A variable to hold any error messages.
return ParameterList

ToArgumentList() public method

Constructs a string array parameter list.
This is useful when you need to use the list with the .NET methods to execute a process.
public ToArgumentList ( ) : string[]
return string[]

this() public method

Gets the value of a parameter.
public this ( string key ) : string
key string The name of the parameter.
return string