C# Class POLUtils.ECompile.EConfig

Provides an interface to manipulate the Ecompile.CFG file
Datei anzeigen Open project: polserver/poltools Class Usage Examples

Public Methods

Method Description
AddPackageRootItem ( string NewValue ) : bool

Adds a new Value to the Package Roots List

EConfig ( ) : System

Default Constructor

Flag ( string OptionName ) : string

Reads commandline flag for given Option

GetPackageRoots ( ) : List

List of Package Roots

LoadConfig ( string ConfigPath ) : bool

Opens the Ecompile.Cfg file for reading.

Option ( string OptionName ) : string

Reads value for given Option

Option ( string OptionName, bool NewValue ) : void

Changes the value for a given Option

Option ( string OptionName, string NewValue ) : void

Changes the value for a given Option

RemoveAllPackageRootItems ( ) : bool

Clears all Values from the List

RemovePackageRootItem ( string Value ) : bool

Remove a specific String Value from the List

SaveConfig ( ) : bool

Saves the Ecompile.Cfg back to file with any changes. File Output is tabbed so that settings are in a straight column and all original lines that were NOT settings are retained as original.

Private Methods

Method Description
BuildFlagList ( ) : void
FindPackageRoots ( String s ) : bool
ReadOptions ( ) : void

Method Details

AddPackageRootItem() public method

Adds a new Value to the Package Roots List
public AddPackageRootItem ( string NewValue ) : bool
NewValue string New Value to add
return bool

EConfig() public method

Default Constructor
public EConfig ( ) : System
return System

Flag() public method

Reads commandline flag for given Option
public Flag ( string OptionName ) : string
OptionName string OptionName string
return string

GetPackageRoots() public method

List of Package Roots
public GetPackageRoots ( ) : List
return List

LoadConfig() public method

Opens the Ecompile.Cfg file for reading.
public LoadConfig ( string ConfigPath ) : bool
ConfigPath string Absolute path to Config File
return bool

Option() public method

Reads value for given Option
public Option ( string OptionName ) : string
OptionName string OptionName string
return string

Option() public method

Changes the value for a given Option
public Option ( string OptionName, bool NewValue ) : void
OptionName string OptionName string
NewValue bool Bool Value to be converted to 0/1 String
return void

Option() public method

Changes the value for a given Option
public Option ( string OptionName, string NewValue ) : void
OptionName string OptionName string
NewValue string New string value to place for option
return void

RemoveAllPackageRootItems() public method

Clears all Values from the List
public RemoveAllPackageRootItems ( ) : bool
return bool

RemovePackageRootItem() public method

Remove a specific String Value from the List
public RemovePackageRootItem ( string Value ) : bool
Value string String Value to remove
return bool

SaveConfig() public method

Saves the Ecompile.Cfg back to file with any changes. File Output is tabbed so that settings are in a straight column and all original lines that were NOT settings are retained as original.
public SaveConfig ( ) : bool
return bool