/// <summary> /// Construye el objeto de configuración cargando los valores desde el registro de Windows. /// </summary> /// <exception cref="ConfigureException">Cuando no se encuentra configurada la URL del servicio del /// componente central en el registro de Windows.</exception> public FireConfig() { if (String.IsNullOrEmpty(ConfigManager.getFireService())) { throw new ConfigureException("No se ha configurado en registro la URL del servicio del componente central"); } this.config = new Dictionary <string, string>(); this.config.Add(KEY_FIRE_SERVICE, ConfigManager.getFireService()); this.config.Add(KEY_ADMIT_ALL_CERTS, ConfigManager.getSSLAdmitAllCerts()); this.config.Add(KEY_SSL_CLIENT_PKCS12, ConfigManager.getSSLClientPkcs12()); this.config.Add(KEY_SSL_CLIENT_PASS, ConfigManager.getSSLClientPass()); }
/// <summary> /// Construye el objeto de configuración cargando los valores proporcionados y, si no se han pasado, los /// valores del registro de Windows. /// </summary> /// <exception cref="ConfigureException">Cuando no se encuentra configurada la URL del servicio del /// componente central ni en el diccionario proporcionado ni en el registro de Windows.</exception> public FireConfig(Dictionary <string, string> config) { if ((config == null || !config.ContainsKey(KEY_FIRE_SERVICE) || String.IsNullOrEmpty(config[KEY_FIRE_SERVICE])) && String.IsNullOrEmpty(ConfigManager.getFireService())) { throw new ConfigureException("No se ha proporcionado ni configurado en registro la URL del servicio del componente central"); } this.config = new Dictionary <string, string>(); initConfigKey(this.config, KEY_FIRE_SERVICE, config, ConfigManager.getFireService()); initConfigKey(this.config, KEY_ADMIT_ALL_CERTS, config, ConfigManager.getSSLAdmitAllCerts()); initConfigKey(this.config, KEY_SSL_CLIENT_PKCS12, config, ConfigManager.getSSLClientPkcs12()); initConfigKey(this.config, KEY_SSL_CLIENT_PASS, config, ConfigManager.getSSLClientPass()); }