예제 #1
0
 //
 // If config has been removed because initialization was not complete,
 // fetch a new configuration record. The record will be created and
 // completely initialized as RequireCompleteInit() will have been called
 // on the ClientConfigurationHost before we receive this event.
 //
 private void OnConfigRemoved(object sender, InternalConfigEventArgs e)
 {
     try {
         IInternalConfigRecord newConfigRecord = _configRoot.GetConfigRecord(_completeConfigRecord.ConfigPath);
         _completeConfigRecord = newConfigRecord;
         _completeConfigRecord.ThrowIfInitErrors();
     }
     catch (Exception ex) {
         _initError = new ConfigurationErrorsException(SR.GetString(SR.Config_client_config_init_error), ex);
         ConfigurationManager.SetInitError(_initError);
         throw _initError;
     }
 }
 private void OnConfigRemoved(object sender, InternalConfigEventArgs e)
 {
     try
     {
         IInternalConfigRecord configRecord = this._configRoot.GetConfigRecord(this._completeConfigRecord.ConfigPath);
         this._completeConfigRecord = configRecord;
         this._completeConfigRecord.ThrowIfInitErrors();
     }
     catch (Exception exception)
     {
         this._initError = new ConfigurationErrorsException(System.Configuration.SR.GetString("Config_client_config_init_error"), exception);
         ConfigurationManager.SetInitError(this._initError);
         throw this._initError;
     }
 }
 internal void OnConfigurationChanged(object sender, InternalConfigEventArgs e)
 {
     HttpRuntime.OnConfigChange();
 }
 internal void OnConfigurationChanged(Object sender, InternalConfigEventArgs e)
 {
     HttpRuntime.OnConfigChange(message: null);
 }