private void OnConfigurationChanging(object sender, ConfigurationChangingEventArgs args) { changedConfigurationFile = args.ConfigurationFile; changedSectionName = args.SectionName; changedOldValue = args.OldValue; changedNewValue = args.NewValue; eventFired = true; }
private void RaiseConfigurationChanging(ConfigurationChangingEventArgs e) { var h = ConfigurationChanging; if (h != null) { h(this, e); } }
IYodiiEngineResult OnConfigurationChangingForExternalWorld(ConfigurationChangingEventArgs eventChanging) { _currentEventArgs = eventChanging; RaiseConfigurationChanging(_currentEventArgs); if (_currentEventArgs.IsCanceled) { return(new YodiiEngineResult(new ConfigurationFailureResult(_currentEventArgs.FailureExternalReasons), Engine)); } return(null); }
public void ConstructorTest() { const string configurationFile = "myconfig.config"; const string sectionName = "mySection"; object oldValue = new object(); object newValue = new object(); ConfigurationChangingEventArgs args = new ConfigurationChangingEventArgs(configurationFile, sectionName, oldValue, newValue); Assert.AreEqual(configurationFile, args.ConfigurationFile); Assert.AreEqual(sectionName, args.SectionName); Assert.IsFalse(args.Cancel); Assert.AreSame(oldValue, args.OldValue); Assert.AreSame(newValue, args.NewValue); }
public void ConstructorTest() { const string configurationFile = "myconfig.config"; const string sectionName = "mySection"; object oldValue = new object(); object newValue = new object(); ConfigurationChangingEventArgs args = new ConfigurationChangingEventArgs(configurationFile, sectionName, oldValue, newValue); Assert.AreEqual(configurationFile, args.ConfigurationFile); Assert.AreEqual(sectionName, args.SectionName); Assert.IsFalse(args.Cancel); Assert.AreSame(oldValue, args.OldValue); Assert.AreSame(newValue, args.NewValue); }
internal void OnConfigurationChanged() { Debug.Assert(_currentEventArgs != null); FinalConfiguration = _currentEventArgs.FinalConfiguration; if (_currentEventArgs.FinalConfigurationChange == FinalConfigurationChange.StatusChanged || _currentEventArgs.FinalConfigurationChange == FinalConfigurationChange.ItemAdded || _currentEventArgs.FinalConfigurationChange == FinalConfigurationChange.ItemRemoved || _currentEventArgs.FinalConfigurationChange == FinalConfigurationChange.ImpactChanged) { RaiseConfigurationChanged(new ConfigurationChangedEventArgs(FinalConfiguration, _currentEventArgs.FinalConfigurationChange, _currentEventArgs.ConfigurationItemChanged)); } else { RaiseConfigurationChanged(new ConfigurationChangedEventArgs(FinalConfiguration, _currentEventArgs.FinalConfigurationChange, _currentEventArgs.ConfigurationLayerChanged)); } _currentEventArgs = null; }
private void OnConfigurationChanging(object sender, ConfigurationChangingEventArgs args) { changedConfigurationFile = args.ConfigurationFile; changedSectionName = args.SectionName; changedOldValue = args.OldValue; changedNewValue = args.NewValue; eventFired = true; }
private void CancelingHandler(object sender, ConfigurationChangingEventArgs args) { args.Cancel = true; eventString += "ChangeCanceled"; }
private void AcceptingHandler(object sender, ConfigurationChangingEventArgs args) { eventString += "ChangeAccepted"; }
private void AcceptingHandler(object sender, ConfigurationChangingEventArgs args) { eventString += "ChangeAccepted"; }
private void CancelingHandler(object sender, ConfigurationChangingEventArgs args) { args.Cancel = true; eventString += "ChangeCanceled"; }