Example #1
0
        /// <summary>
        /// Deletes a setting
        /// </summary>
        /// <param name="setting">Setting</param>
        public virtual void DeleteSetting(Setting setting)
        {
            if (setting == null)
            {
                throw new ArgumentNullException("setting");
            }

            _settingProvider.DeleteSetting(setting.Key);
            //cache
            //_cacheManager.RemoveByPattern(setting.Key);
            try
            {
                _settingNotification.NotifyForSettingChange(new SettingNotify(setting)
                {
                    NotifyType = "DeleteSetting"
                });
            }
            catch (Exception exception)
            {
                EventLog.WriteEntry("Application", exception.ToString(), EventLogEntryType.Error);
            }
        }