private void configurationSource_ConfigurationSourceChanged(object sender, ConfigurationSourceChangedEventArgs args)
 {
     if (args.ChangedSectionNames.Contains(ConfigurationSourceSection.SectionName))
     {
         Refresh();
     }
 }
Example #2
0
        /// <summary>
        /// Raises the <see cref="SourceChanged"/> event.
        /// </summary>
        /// <param name="args">Event arguments</param>
        protected void OnSourceChangedEvent(ConfigurationSourceChangedEventArgs args)
        {
            var handler = this.SourceChanged;

            if (handler != null)
            {
                handler(this, args);
            }
        }
Example #3
0
        /// <summary>
        /// Raises the <see cref="SourceChanged"/> event.
        /// </summary>
        /// <param name="configurationSourceChangedEventArgs">The argument for the raised event.</param>
        protected virtual void OnSourceChanged(ConfigurationSourceChangedEventArgs configurationSourceChangedEventArgs)
        {
            var handler = this.SourceChanged;

            if (handler != null)
            {
                handler(this, configurationSourceChangedEventArgs);
            }
        }
        protected override void Act()
        {
            base.ConfigurationSourceHandler.DoEnsurePropagatingSectionChangeEvents(SubordinateSource1Name, "Section1");
            base.ConfigurationSourceHandler.DoEnsurePropagatingSectionChangeEvents(SubordinateSource1Name, "Section2");

            ConfigurationSourceHandler.ConfigurationSourceChanged += (sender, args) =>
            {
                sourceChangedEvent = args;
            };

            base.ConfigurationSourceHandler.DoPublicRefresh();

        }
 void compositeConfigurationSource_ConfigurationSourceChanged(object sender, ConfigurationSourceChangedEventArgs e)
 {
     compositeConfigurationSource.DoConfigurationSourceChanged(e.ChangedSectionNames);
 }
 void compositeConfigurationSource_ConfigurationSourceChanged(object sender, ConfigurationSourceChangedEventArgs e)
 {
     compositeConfigurationSource.DoConfigurationSourceChanged(e.ChangedSectionNames);
 }
 private void configurationSource_ConfigurationSourceChanged(object sender, ConfigurationSourceChangedEventArgs args)
 {
     if (args.ChangedSectionNames.Contains(ConfigurationSourceSection.SectionName))
     {
         Refresh();
     }
 }
 void handler_ConfigurationSourceChanged(object sender, ConfigurationSourceChangedEventArgs e)
 {
     this.OnSourceChanged(new ConfigurationSourceChangedEventArgs(this, e.ChangedSectionNames));
 }
 /// <summary>
 /// Raises the <see cref="SourceChanged"/> event.
 /// </summary>
 /// <param name="configurationSourceChangedEventArgs">The argument for the raised event.</param>
 protected virtual void OnSourceChanged(ConfigurationSourceChangedEventArgs configurationSourceChangedEventArgs)
 {
     var handler = this.SourceChanged;
     if (handler != null)
     {
         handler(this, configurationSourceChangedEventArgs);
     }
 }
Example #10
0
 void handler_ConfigurationSourceChanged(object sender, ConfigurationSourceChangedEventArgs e)
 {
     this.OnSourceChanged(new ConfigurationSourceChangedEventArgs(this, e.ChangedSectionNames));
 }
 /// <summary>
 /// Raises the <see cref="SourceChanged"/> event.
 /// </summary>
 /// <param name="args">Event arguments</param>
 protected void OnSourceChangedEvent(ConfigurationSourceChangedEventArgs args)
 {
     var handler = this.SourceChanged;
     if (handler != null)
     {
         handler(this, args);
     }
 }
 void configurationSourcetoListenTo_SourceChanged(object sender, ConfigurationSourceChangedEventArgs e)
 {
     ConfigurationSourceChangedRaiseCount++;
     LastConfigurationSourceChangedEventArgs = e;
 }
 private void OnRootConfigurationSourceChanged(object sender, ConfigurationSourceChangedEventArgs e)
 {
     sourceChanged.Set();
 }
 private void OnConfigurationChanged(object sender, ConfigurationSourceChangedEventArgs e)
 {
     MyInnerFoo = e.Container.GetInstance<IFoo>();
 }
        public void Given()
        {
            eventSource = new ConfigurationChangeEventSourceImpl();
            configurationSource = new DictionaryConfigurationSource();
            configurationSource.Add(testsSectionName, new TestsConfigurationSection());
            mockLocator = new Mock<IServiceLocator>().Object;

            eventSource.SourceChanged += (sender, e) => { sourceChangedEventArgs = e; };

            eventSource.GetSection<TestsConfigurationSection>().SectionChanged +=
                (sender, e) => { sectionChangedEventArgs = e; };

            eventSource.GetSection<AppSettingsSection>().SectionChanged +=
                (sender, e) => { appSettingsChangedEventArgs = e; };

            eventSource.ConfigurationSourceChanged(configurationSource, mockLocator, testsSectionName);
        }