C# Class Innovatian.Configuration.CommandLineConfigurationSource

Inheritance: AbstractConfigurationSource
Mostra file Open project: idavis/innovatian.configuration

Public Methods

Method Description
AddSwitch ( string sectionName ) : void

Adds the switch to match against the arguments mapping each switch.

AddSwitch ( string sectionName, IEnumerable switches ) : void

Adds the switch to match against the arguments mapping each switch.

AddSwitch ( string sectionName, string longName, string shortName ) : void

Adds the switch to match against the arguments mapping the short name value to the long name (and short name) keys if possible.

CommandLineConfigurationSource ( string args ) : System

Initializes a new instance of the class.

CommandLineConfigurationSource ( string args, string sectionName ) : System

Initializes a new instance of the class.

CommandLineConfigurationSource ( string args, string sectionName, IEnumerable switches ) : System

Initializes a new instance of the class.

Exists ( string switchName ) : bool

Determins whether the specified switch name has a corresponding value in a section.

Reload ( ) : void

Reloads this instance.

Save ( ) : void

Saves this instance.

Private Methods

Method Description
Extract ( IEnumerable args ) : void

Method Details

AddSwitch() public method

Adds the switch to match against the arguments mapping each switch.
public AddSwitch ( string sectionName ) : void
sectionName string /// Name of the section to add the settings into. ///
return void

AddSwitch() public method

Adds the switch to match against the arguments mapping each switch.
public AddSwitch ( string sectionName, IEnumerable switches ) : void
sectionName string /// Name of the section to add the settings into. ///
switches IEnumerable /// The arguments switches to match against the arguments. The values /// may be accessed through these switches. ///
return void

AddSwitch() public method

Adds the switch to match against the arguments mapping the short name value to the long name (and short name) keys if possible.
public AddSwitch ( string sectionName, string longName, string shortName ) : void
sectionName string /// Name of the section to add the settings into. ///
longName string /// The long name of the switch. ///
shortName string /// The short name of the switch. This must be 1 or 2 characters in /// length. ///
return void

CommandLineConfigurationSource() public method

Initializes a new instance of the class.
public CommandLineConfigurationSource ( string args ) : System
args string /// The arguments to procces. ///
return System

CommandLineConfigurationSource() public method

Initializes a new instance of the class.
public CommandLineConfigurationSource ( string args, string sectionName ) : System
args string /// The arguments to procces. ///
sectionName string /// Name of the section to add the settings into. ///
return System

CommandLineConfigurationSource() public method

Initializes a new instance of the class.
public CommandLineConfigurationSource ( string args, string sectionName, IEnumerable switches ) : System
args string /// The arguments to procces. ///
sectionName string /// Name of the section to add the settings into. ///
switches IEnumerable /// The arguments switches to match against the arguments. The values /// may be accessed through these switches. ///
return System

Exists() public method

Determins whether the specified switch name has a corresponding value in a section.
public Exists ( string switchName ) : bool
switchName string /// Name of the switch. ///
return bool

Reload() public method

Reloads this instance.
public Reload ( ) : void
return void

Save() public method

Saves this instance.
public Save ( ) : void
return void