Exemple #1
0
        ///Use 'name' from ConfigurationConstants!
        public ConfigurationObject ReadOrDefaultConfigurationObject(string name)
        {
            var currentObject = _databaseAdapter.GetConfigurationObject(name);

            return(currentObject ?? ConfigurationObject.CreateConfiguration(name,
                                                                            ConfigurationConstants.GetDefault(name)));
        }
Exemple #2
0
        public void AddConfigurationObject(string name, string value)
        {
            var config = new ConfigurationObject()
            {
                Name = name, Value = value
            };

            _databaseAdapter.WriteConfigurationObject(config);
        }
Exemple #3
0
 private void SaveConfigurationObject(ConfigurationObject configurationObject)
 {
     _databaseAdapter.WriteConfigurationObject(configurationObject);
 }
Exemple #4
0
 private void OnConfigurationObjectUpdated(ConfigurationObject newObject)
 {
     ConfigurationObjectUpdated?.Invoke(this, newObject);
 }