C# Class ZeroInstall.Store.Config

Mostra file Open project: 0install/0install-win Class Usage Examples

Public Methods

Method Description
Clone ( ) : Config

Creates a deep copy of this Config instance.

Equals ( Config other ) : bool
Equals ( object obj ) : bool
GetHashCode ( ) : int
GetOption ( string key ) : string

Retrieves the string representation of an option identified by a key.

ResetOption ( string key ) : void

Resets an option identified by a key to its default value.

Save ( ) : void

Saves the settings to an INI file in the default location in the user profile.

This method performs an atomic write operation when possible.

Save ( [ path ) : void

Saves the settings to an INI file.

This method performs an atomic write operation when possible.

SetOption ( string key, string value ) : void

Sets an option identified by a key.

ToString ( ) : string

Returns the keys and values of all contained setings.

Private Methods

Method Description
ICloneable ( ) : object
Load ( ) : Config
Load ( [ path ) : Config
ReadFromAppSettings ( ) : void

Reads settings from ConfigurationManager.AppSettings and transfers them to properties.

ReadFromIniFile ( [ path ) : void

Reads settings from an INI file on the disk and transfers them to properties.

ReadFromIniFiles ( ) : void

Reads settings from INI files on the disk and transfers them to properties.

ReadFromRegistry ( ) : void

Reads settings from Windows policy registry keys and transfers them to properties.

ReadFromRegistry ( [ registryKey ) : void

Reads settings from a Windows registry key and transfers them to properties.

TransferToIni ( ) : void

Transfers settings from properties to _iniData.

Method Details

Clone() public method

Creates a deep copy of this Config instance.
public Clone ( ) : Config
return Config

Equals() public method

public Equals ( Config other ) : bool
other Config
return bool

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

GetHashCode() public method

public GetHashCode ( ) : int
return int

GetOption() public method

Retrieves the string representation of an option identified by a key.
is invalid.
public GetOption ( string key ) : string
key string The key of the option to retrieve.
return string

ResetOption() public method

Resets an option identified by a key to its default value.
is invalid.
public ResetOption ( string key ) : void
key string The key of the option to reset.
return void

Save() public method

Saves the settings to an INI file in the default location in the user profile.
This method performs an atomic write operation when possible.
A problem occurs while writing the file. Write access to the file is not permitted.
public Save ( ) : void
return void

Save() public method

Saves the settings to an INI file.
This method performs an atomic write operation when possible.
A problem occurs while writing the file. Write access to the file is not permitted.
public Save ( [ path ) : void
path [
return void

SetOption() public method

Sets an option identified by a key.
is invalid. is invalid.
public SetOption ( string key, string value ) : void
key string The key of the option to set.
value string A string representation of the option.
return void

ToString() public method

Returns the keys and values of all contained setings.
public ToString ( ) : string
return string