Beispiel #1
0
        public ConfigurationObject ReadConfigurationObject(string name)
        {
            //var objectFromDB = _databaseAdapter.GetConfigurationObjectOld(name);
            var objectFromDB = _databaseAdapter.GetConfigurationObject(name);

            if (objectFromDB != null)
            {
                objectFromDB.Description = ConfigurationConstants.GetDescription(name);
            }
            return(objectFromDB);
        }
Beispiel #2
0
        ///Use 'name' from ConfigurationConstants!
        public ConfigurationObject ReadOrDefaultConfigurationObject(string name)
        {
            //var currentObject = _databaseAdapter.GetConfigurationObjectOld(name);
            var currentObject = _databaseAdapter.GetConfigurationObject(name);

            return(currentObject ?? ConfigurationObject.CreateConfiguration(name,
                                                                            ConfigurationConstants.GetDefault(name), ConfigurationConstants.GetDescription(name)));
        }