protected virtual void OnConfigurationChanged(ConfigurationChangedEventArgs e)
 {
     if (null != ConfigurationChanged)
     {
         ConfigurationChanged(this, e);
     }
 }
		private void OnConfigurationChanged(object sender, ConfigurationChangedEventArgs e)
		{
			lock (this)
			{
				notifications++;
			}
		}
        /// <summary>
        /// Notify updated configuration sections.
        /// </summary>
        /// <param name="sectionsToNotify">
        /// The name of the sections to notify.
        /// </param>
        public void NotifyUpdatedSections(IEnumerable<string> sectionsToNotify)
        {
            foreach (string rawSectionName in sectionsToNotify)
            {
                String sectionName = CanonicalizeSectionName(rawSectionName);

                Delegate[] invocationList = null;

                lock (eventHandlersLock)
                {
                    ConfigurationChangedEventHandler callbacks = (ConfigurationChangedEventHandler)eventHandlers[sectionName];
                    if (callbacks == null)
                    {
                        continue;
                    }
                    invocationList = callbacks.GetInvocationList();
                }

                ConfigurationChangedEventArgs eventData = new ConfigurationChangedEventArgs(sectionName);
                foreach (ConfigurationChangedEventHandler callback in invocationList)
                {
                    try
                    {
                        if (callback != null)
                        {
                            callback(this, eventData);
                        }
                    }
                    catch (Exception e)
                    {
                        ManageabilityExtensionsLogger.LogException(e,
                                                                   String.Format(CultureInfo.CurrentCulture,
                                                                                 Resources.ExceptionErrorOnCallbackForSectionUpdate,
                                                                                 sectionName,
                                                                                 callback.ToString()));
                    }
                }
            }
        }
 void compositeConfigurationSource_ConfigurationSectionChanged(object sender, ConfigurationChangedEventArgs e)
 {
     DoSourceSectionChanged(e.SectionName);
 }
Exemplo n.º 5
0
 private void OnExternalConfigurationChanged(object sender, ConfigurationChangedEventArgs args)
 {
     ExternalConfigSourceChanged(args.SectionName);
 }
Exemplo n.º 6
0
 private void updateEvents(object sender, ConfigurationChangedEventArgs args)
 {
     args.OldList.CollectionChanged -= onCollectionChanged;
     args.NewList.CollectionChanged += onCollectionChanged;
 }
 private void OnDataConfigurationChanged(object sender, ConfigurationChangedEventArgs args)
 {
     changedConfigurationFile = Path.GetFileName(args.ConfigurationFile);
     changedSectionName = args.SectionName;
     eventFired = true;
 }
 void OnConfigurationChanged(object sender, ConfigurationChangedEventArgs args)
 {
     if (updatedSectionsTally.ContainsKey(args.SectionName))
     {
         updatedSectionsTally[args.SectionName] = updatedSectionsTally[args.SectionName] + 1;
     }
     else
     {
         updatedSectionsTally[args.SectionName] = 1;
     }
 }
 void OnConfigurationChanged(object sender,
                             ConfigurationChangedEventArgs e)
 {
     UpdateConfiguration(e.SectionName);
 }
 private void OnMockConfigConfigurationChanged(object sender, ConfigurationChangedEventArgs args)
 {
     changedSectionName = args.SectionName;
     eventFired         = true;
 }
 private void OnDataConfigurationChanged(object sender, ConfigurationChangedEventArgs args)
 {
     changedConfigurationFile = Path.GetFileName(args.ConfigurationFile);
     changedSectionName       = args.SectionName;
     eventFired = true;
 }
Exemplo n.º 12
0
 private void ConfigurationChanged(object sender, ConfigurationChangedEventArgs e)
 {
     this.SetCulture(e.NewConfiguration);
 }
Exemplo n.º 13
0
 void TypeResolverConfigurationChanged(object sender, ConfigurationChangedEventArgs<ITypeResolver> e)
 {
     _configurationChangedVisited = true;
     _before = e.OldValue;
     _after = e.NewValue;
 }
Exemplo n.º 14
0
 private void OnConfigurationChanged(object sender, ConfigurationChangedEventArgs args)
 {
     Assert.AreEqual(Path.GetFileName(myConfigTestFile).ToLower(), Path.GetFileName(args.ConfigurationFile).ToLower());
     Assert.AreEqual(ConfigurationSettings.SectionName, args.SectionName);
     ++eventFiredCount;
 }
Exemplo n.º 15
0
 void Tank_TankConfigurationChanged(object sender, ConfigurationChangedEventArgs e)
 {
     this.UpdateValue();
 }
Exemplo n.º 16
0
 private void SettingsConfigFileReloaded(ConfigurationChangedEventArgs args)
 {
     LoadSettings();
 }
        private void ConfigServiceSettingsChanged(object sender, ConfigurationChangedEventArgs e)
        {
            var config = _configService.Read();

            ApplyAutoCompleteSettings(config);
        }
Exemplo n.º 18
0
 /// <summary>
 ///     Handles the ConfigurationChanged event of the SolutionProxy control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="ConfigurationChangedEventArgs" /> instance containing the event data.</param>
 private void SolutionProxy_ConfigurationChanged(object sender, ConfigurationChangedEventArgs e)
 {
     UpdateStartupProjects(e.Profiles, e.SelectedProfile);
 }
Exemplo n.º 19
0
 void TypeResolverConfigurationChanged(object sender, ConfigurationChangedEventArgs <ITypeResolver> e)
 {
     _configurationChangedVisited = true;
     _before = e.OldValue;
     _after  = e.NewValue;
 }
 public static bool IsConfigurationKey(this ConfigurationChangedEventArgs e, string expectedKey)
 {
     return(IsConfigurationKey(e.Key, expectedKey));
 }
 void OnConfigurationChanged(object sender,
                             ConfigurationChangedEventArgs e)
 {
     notifiedEvents.Add(e);
 }
Exemplo n.º 22
0
 private void ConfigurationChanged(object sender, ConfigurationChangedEventArgs e)
 {
     this.ApplyNewConfiguration(e.NewConfiguration);
 }
Exemplo n.º 23
0
 private void OnMockConfigConfigurationChanged(object sender, ConfigurationChangedEventArgs args)
 {
     changedSectionName = args.SectionName;
     eventFired = true;
 }
 private void FileChanged(object sender, ConfigurationChangedEventArgs eventData)
 {
     configurationChangeCounter++;
     storedEventArgs = eventData;
 }
Exemplo n.º 25
0
 /// <summary>
 ///     Handles the ConfigurationChanged event of the Solution control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="ConfigurationChangedEventArgs" /> instance containing the event data.</param>
 private void Solution_ConfigurationChanged(object sender, ConfigurationChangedEventArgs e)
 {
     ConfigurationChanged?.Invoke(this, e);
 }
 private void ExceptionThrowingCallback(object sender, ConfigurationChangedEventArgs eventData)
 {
     throw new Exception();
 }
Exemplo n.º 27
0
 private void OnConfigurationChanged(object sender, ConfigurationChangedEventArgs e)
 {
     notifiedEvents.Add(e);
 }
 private void DifferentFileChangedCallback(object sender, ConfigurationChangedEventArgs eventData)
 {
     configurationChangeCounter++;
 }
Exemplo n.º 29
0
 private void ConfigurationChanged(object sender, ConfigurationChangedEventArgs e)
 {
     this.iconAnimationmode = e.NewConfiguration.IconAnimationMode;
     // Reset, just in case
     this.SyncthingSyncing = false;
 }
 private void DifferentFileChangedCallback(object sender, ConfigurationChangedEventArgs eventData)
 {
     configurationChangeCounter++;
 }
Exemplo n.º 31
0
 private void ConfigurationChanged(object sender, ConfigurationChangedEventArgs e)
 {
     this.SetCulture(e.NewConfiguration);
 }
 private void ExceptionThrowingCallback(object sender, ConfigurationChangedEventArgs eventData)
 {
     throw new Exception();
 }
        static void rep_ConfigurationChanged(object sender, EventArgs e)
        {
            ConfigurationChangedEventArgs configChanged = (ConfigurationChangedEventArgs)e;

            Assert.IsTrue(configChanged.ConfigurationMessages.Count > 0);
        }
 private void FileChanged(object sender, ConfigurationChangedEventArgs eventData)
 {
     configurationChangeCounter++;
     storedEventArgs = eventData;
 }
Exemplo n.º 35
0
 private void ConfigurationChanged(object sender, ConfigurationChangedEventArgs e)
 {
     this.HaveDonated = e.NewConfiguration.HaveDonated;
 }
 void OnConfigurationChanged(object sender,
                             ConfigurationChangedEventArgs e)
 {
     UpdateConfiguration(e.SectionName);
 }
Exemplo n.º 37
0
 private void ConfigurationChanged(object sender, ConfigurationChangedEventArgs e)
 {
     this.ApplyNewConfiguration(e.NewConfiguration);
 }
Exemplo n.º 38
0
 /// <summary>
 /// Raises the <see cref="ConfigurationChanged"/> event
 /// </summary>
 /// <param name="e">Configuration change event arguments</param>
 private static void OnConfigurationChanged(ConfigurationChangedEventArgs<ITypeResolver> e)
 {
     var handler = ConfigurationChanged;
     if (handler != null) handler(null, e);
 }
 /// <summary>
 /// Raises the <see cref="ConfigurationChanged"/> event.
 /// </summary>
 /// <param name="sender">The sender of the event.</param>
 /// <param name="args">The event arguments.</param>
 public void OnConfigurationChanged(object sender,
                                    ConfigurationChangedEventArgs args)
 {
     if (ConfigurationChanged != null)
     {
         ConfigurationChanged(this, args);
     }
 }
 private void OnConfigurationChanged(object sender, ConfigurationChangedEventArgs e)
 {
     System.Diagnostics.Debug.WriteLine(string.Join("\n", e.ChangedCredentials));
 }
 public void ConfigurationChanged(object sender,
                                  ConfigurationChangedEventArgs e)
 {
     notifiedChanges.Add(e);
     if (notifiedChanges.Count == notificationsForException)
     {
         throw new Exception("bogus");
     }
 }
 private void OnConfigurationChanged(object sender, ConfigurationChangedEventArgs args)
 {
     Assert.AreEqual(testConfigFile, Path.GetFileName(args.ConfigurationFile));
     Assert.AreEqual(applConfig1, args.SectionName);
     ++eventFiredCount;
 }
Exemplo n.º 43
0
 private void OnConfigurationChanged(object sender, ConfigurationChangedEventArgs args)
 {
     changedConfigurationFile = args.ConfigurationFile;
     changedSectionName = args.SectionName;
     eventFired = true;
     eventCount++;
 }
        protected virtual void OnConfigurationChanged()
        {
            ConfigurationChangedEventHandler callbacks = (ConfigurationChangedEventHandler)eventHandlers[configurationChangedKey];
            ConfigurationChangedEventArgs eventData = new ConfigurationChangedEventArgs(Path.GetFullPath(configFilePath), configurationSectionName);

            try
            {
                if (callbacks != null)
                {
                    callbacks(this, eventData);
                }
            }
            catch (Exception e)
            {
                EventLog.WriteEntry(eventSourceName, SR.ExceptionEventRaisingFailed + ":" + e.Message);
            }
        }
Exemplo n.º 45
0
 private void OnMetaDataConfigurationChanged(object sender, ConfigurationChangedEventArgs args)
 {
     changedConfigurationFile = args.ConfigurationFile;
     changedSectionName = args.SectionName;
     eventFired = true;
     eventString += "MetaDataChanged";
 }
 private void OnConfigurationChanged(object sender, ConfigurationChangedEventArgs args)
 {
     Assert.AreEqual(testConfigFile, Path.GetFileName(args.ConfigurationFile));
     Assert.AreEqual(applConfig1, args.SectionName);
     ++eventFiredCount;
 }
 /// <summary>
 /// Raises the <see cref="ConfigurationChanged"/> event
 /// </summary>
 /// <param name="e">Configuration change event arguments</param>
 private static void OnConfigurationChanged(ConfigurationChangedEventArgs<IResourceConnectionProviderRegistry> e)
 {
     var handler = ConfigurationChanged;
     if (handler != null) handler(null, e);
 }
Exemplo n.º 48
0
 private void OnConfigurationChanged(object sender, ConfigurationChangedEventArgs e)
 {
     ApplyConfiguration();
 }
        void OnConfigurationSectionChange(object sender,
                                          ConfigurationChangedEventArgs e)
        {
            TestsConfigurationSection section
                = (TestsConfigurationSection)instance.GetSection(e.SectionName);

            valuesForNotifiedSections[e.SectionName] = section != null ? section.Value : null;
        }
Exemplo n.º 50
0
 private void OnSettingsConfigurationChanged(ConfigurationChangedEventArgs args)
 {
     this.LoadFavoritesToolbar();
 }