WinCompose.SettingsEntry.Save C# (CSharp) Méthode

Save() public méthode

Saves this settings entry into the settings file. This operation is thread-safe and process-safe.
public Save ( ) : bool
Résultat bool
        public bool Save()
        {
            if (Settings.CreateConfigDir() && m_mutex.WaitOne(2000))
            {
                try
                {
                    var string_value = Serialize(Value);
                    var result = NativeMethods.WritePrivateProfileString(Section, Key, string_value, Settings.GetConfigFile());
                    return result == 0;
                }
                finally
                {
                    // Ensure the mutex is always released even if an
                    // exception is thrown
                    m_mutex.ReleaseMutex();
                }
            }
            return false;
        }