C# Класс ZeroInstall.Store.Config

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

Clone() публичный Метод

Creates a deep copy of this Config instance.
public Clone ( ) : Config
Результат Config

Equals() публичный Метод

public Equals ( Config other ) : bool
other Config
Результат bool

Equals() публичный Метод

public Equals ( object obj ) : bool
obj object
Результат bool

GetHashCode() публичный Метод

public GetHashCode ( ) : int
Результат int

GetOption() публичный Метод

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.
Результат string

ResetOption() публичный Метод

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.
Результат void

Save() публичный Метод

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
Результат void

Save() публичный Метод

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 [
Результат void

SetOption() публичный Метод

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.
Результат void

ToString() публичный Метод

Returns the keys and values of all contained setings.
public ToString ( ) : string
Результат string