示例#1
0
        public void Remove(string groupName)
        {
            #region Contracts

            if (string.IsNullOrEmpty(groupName) == true)
            {
                throw new ArgumentNullException();
            }

            #endregion

            lock (_syncRoot)
            {
                // Cache
                _cacheGroupName     = null;
                _cacheGroupInstance = null;

                // Repository
                _repository.Remove(groupName);
            }
        }
示例#2
0
        public bool Remove(string key)
        {
            #region Contracts

            if (string.IsNullOrEmpty(key) == true)
            {
                throw new ArgumentNullException();
            }

            #endregion

            // Require
            if (_repository.ContainsKey(key) == false)
            {
                return(false);
            }

            // Repository
            _repository.Remove(key);

            // Return
            return(true);
        }