C# Class gov.va.medora.mdo.dao.file.ConfigFileDao

Exibir arquivo Open project: OSEHRA/mdo Class Usage Examples

Public Methods

Method Description
ConfigFileDao ( string filePath ) : System

ConfigFileDao constructor

getAllValues ( ) : Dictionary>

Get all config file values

getValue ( string key, string section ) : string

Seek out a config file value

removeFromFile ( string key, string section ) : void

Remove a configuration item from the config file

updateValue ( string key, string value, string section ) : void

Update or add a key and value to the config file

writeToFile ( string>.Dictionary kvps ) : void

Write a dictionary of config/value pairs to the config file

Method Details

ConfigFileDao() public method

ConfigFileDao constructor
public ConfigFileDao ( string filePath ) : System
filePath string The full path to the config file
return System

getAllValues() public method

Get all config file values
public getAllValues ( ) : Dictionary>
return Dictionary>

getValue() public method

Seek out a config file value
public getValue ( string key, string section ) : string
key string The config file key
section string
return string

removeFromFile() public method

Remove a configuration item from the config file
public removeFromFile ( string key, string section ) : void
key string The config item key
section string
return void

updateValue() public method

Update or add a key and value to the config file
public updateValue ( string key, string value, string section ) : void
key string Config key
value string Config value
section string Config section
return void

writeToFile() public method

Write a dictionary of config/value pairs to the config file
public writeToFile ( string>.Dictionary kvps ) : void
kvps string>.Dictionary List of Key/Value pairs
return void