Esempio n. 1
0
        /// <summary>
        /// Saves the specified named connection element.
        /// </summary>
        /// <param name="namedConnectionElement">The named connection element.</param>
        public void Save(NamedConnectionElement namedConnectionElement)
        {
            var current = _monahrqConfigurationSettings.NamedConnections.OfType <NamedConnectionElement>().FirstOrDefault(elem => elem.Name == namedConnectionElement.Name);

            if (current != null)
            {
                _monahrqConfigurationSettings.NamedConnections.Remove(current);
            }
            _monahrqConfigurationSettings.NamedConnections.Add(namedConnectionElement);
            MonahrqConfiguration.Save(_monahrqConfigurationSettings);
        }
Esempio n. 2
0
 /// <summary>
 /// Saves the specified monahrq settings instance.
 /// </summary>
 /// <param name="settings">The settings.</param>
 public void Save(IMonahrqSettings settings)
 {
     MonahrqConfiguration.Save(settings);
     ForceRefresh();
 }