/// <summary>
 /// <para>Raises the <seealso cref="ConfigurationChanging"/> event.</para>
 /// </summary>
 /// <param name="e">
 /// <para>A <see cref="ConfigurationChangingEventArgs"/> that contains the event data.</para>
 /// </param>
 protected virtual void OnConfigurationChanging(ConfigurationChangingEventArgs e)
 {
     if (null != ConfigurationChanging)
     {
         ConfigurationChanging(this, e);
     }
 }
        private bool UserAcceptsMetaConfigurationChange(ConfigurationSettings configurationSettings)
        {
            ConfigurationChangingEventArgs args = new ConfigurationChangingEventArgs(this.configFile.FileName, ConfigurationSettings.SectionName, this.configurationSettings, configurationSettings);

            OnConfigurationChanging(args);
            return(args.Cancel == false);
        }
 private void OnConfigurationBuilderConfigurationChanging(object sender, ConfigurationChangingEventArgs e)
 {
     if (ConfigurationChanging != null)
     {
         ConfigurationChanging(this, e);
     }
 }
 /// <devdoc>
 /// Raises the ConfigurationChanging event.
 /// </devdoc>
 private void OnConfigurationChanging(object sender, ConfigurationChangingEventArgs args)
 {
     if (ConfigurationChanging != null)
     {
         ConfigurationChanging(sender, args);
     }
 }
        /// <summary>
        /// <para>
        /// Write configuration for a section to storage.
        /// </para>
        /// </summary>
        /// <param name="sectionName">
        /// <para>The name of the section for the configuration data.</para>
        /// </param>
        /// <param name="configValue">
        /// <para>The configuration value to store.</para>
        /// </param>
        /// <exception cref="ConfigurationException">
        /// <para><paramref name="sectionName"/> is not valid section for this configuration.</para>
        /// <para>- or -</para>
        /// <para>The section data is read only.</para>
        /// <para>- or -</para>
        /// <para>An error occured while reading the configuration to save the data.</para>
        /// </exception>
        public void WriteConfiguration(string sectionName, object configValue)
        {
            ValidateSection(sectionName);
            ConfigurationChangingEventArgs args = CreateConfigurationChangingEventArgs(sectionName, configValue);

            OnConfigurationChanging(args);
            if (!args.Cancel)
            {
                IStorageProviderWriter configStorageWriter = GetConfigurationStorageWriter(sectionName);
                object writeData = GetSerializedDataToWrite(sectionName, configValue);
                ConfigurationWriterActionCommand writerActionCommand = new ConfigurationWriterActionCommand(configStorageWriter, writeData);
                sections.UpdateSection(sectionName, writerActionCommand, configValue);

                ConfigurationChangedEventArgs changedArgs = new ConfigurationChangedEventArgs(configFile.FileName, sectionName);
                OnConfigurationChanged(changedArgs);
            }
        }
 /// <devdoc>
 /// Raises the ConfigurationChanging event.
 /// </devdoc>
 private void OnConfigurationChanging(object sender, ConfigurationChangingEventArgs args)
 {
     if (ConfigurationChanging != null)
     {
         ConfigurationChanging(sender, args);
     }
 }
 private void OnConfigurationBuilderConfigurationChanging(object sender, ConfigurationChangingEventArgs e)
 {
     if (ConfigurationChanging != null)
     {
         ConfigurationChanging(this, e);
     }
 }
 private bool UserAcceptsMetaConfigurationChange(ConfigurationSettings configurationSettings)
 {
     ConfigurationChangingEventArgs args = new ConfigurationChangingEventArgs(this.configFile.FileName, ConfigurationSettings.SectionName, this.configurationSettings, configurationSettings);
     OnConfigurationChanging(args);
     return args.Cancel == false;
 }
 /// <summary>
 /// <para>Raises the <seealso cref="ConfigurationChanging"/> event.</para>
 /// </summary>
 /// <param name="e">
 /// <para>A <see cref="ConfigurationChangingEventArgs"/> that contains the event data.</para>
 /// </param>
 protected virtual void OnConfigurationChanging(ConfigurationChangingEventArgs e)
 {
     if (null != ConfigurationChanging)
     {
         ConfigurationChanging(this, e);
     }
 }