C# Class WinCompose.SettingsEntry

The base class to represent an entry in the settings file. It handles thread-safe and process-safe saving and loading.
显示文件 Open project: samhocevar/wincompose Class Usage Examples

Public Methods

Method Description
Load ( ) : bool

Loads this settings entry from the settings file. This operation is thread-safe and process-safe.

Save ( ) : bool

Saves this settings entry into the settings file. This operation is thread-safe and process-safe.

Protected Methods

Method Description
Deserialize ( string str ) : object

Deserializes the given string into an object of the type of this entry. This method should not throw any unhandled exception.

Serialize ( object value ) : string

Serializes the given value into a string. This method should not throw any unhandled exception.

SettingsEntry ( string section, string key, object defaultValue ) : System

Method Details

Deserialize() protected abstract method

Deserializes the given string into an object of the type of this entry. This method should not throw any unhandled exception.
protected abstract Deserialize ( string str ) : object
str string The string to deserialize.
return object

Load() public method

Loads this settings entry from the settings file. This operation is thread-safe and process-safe.
public Load ( ) : bool
return bool

Save() public method

Saves this settings entry into the settings file. This operation is thread-safe and process-safe.
public Save ( ) : bool
return bool

Serialize() protected abstract method

Serializes the given value into a string. This method should not throw any unhandled exception.
protected abstract Serialize ( object value ) : string
value object The value to serialize.
return string

SettingsEntry() protected method

protected SettingsEntry ( string section, string key, object defaultValue ) : System
section string
key string
defaultValue object
return System