C# Class ZeroInstall.Store.Config

Afficher le fichier Open project: 0install/0install-win Class Usage Examples

Méthodes publiques

Méthode 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

Méthode 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 méthode

Creates a deep copy of this Config instance.
public Clone ( ) : Config
Résultat Config

Equals() public méthode

public Equals ( Config other ) : bool
other Config
Résultat bool

Equals() public méthode

public Equals ( object obj ) : bool
obj object
Résultat bool

GetHashCode() public méthode

public GetHashCode ( ) : int
Résultat int

GetOption() public méthode

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.
Résultat string

ResetOption() public méthode

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.
Résultat void

Save() public méthode

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
Résultat void

Save() public méthode

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 [
Résultat void

SetOption() public méthode

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.
Résultat void

ToString() public méthode

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