/// <summary> /// Creates a new object that is a copy of the current instance. The value is not copied. /// </summary> /// <returns>A new object that is a copy of this instance without value.</returns> public CacheEntry CloneWithoutValue() { CacheEntry e = new CacheEntry(); lock (this) { e._exh = _exh; e._evh = _evh; if (this._grpInfo != null) { e._grpInfo = (GroupInfo)this._grpInfo.Clone(); } e._bitset = (BitSet)_bitset.Clone(); e._syncDependency = _syncDependency; e._queryInfo = _queryInfo; if (_keysDependingOnMe != null) { e._keysDependingOnMe = _keysDependingOnMe.Clone() as HashVector; } if (this.LockMetaInfo != null) { e.LockId = this.LockId; e.LockDate = this.LockDate; e.LockAge = this.LockAge; e.LockExpiration = this.LockExpiration; e.LockMetaInfo.LockManager = this.LockMetaInfo.LockManager; } e._size = _size; e._version = this._version; e._creationTime = this._creationTime; e._lastModifiedTime = this._lastModifiedTime; e._resyncProviderName = this._resyncProviderName; e._providerName = this._providerName; if (this.Value is CallbackEntry) { CallbackEntry cbEntry = (CallbackEntry)this.Value; cbEntry = cbEntry.Clone() as CallbackEntry; cbEntry.Value = null; e.Value = cbEntry; } e._type = _type; e._itemRemovedListener = _itemRemovedListener; e._itemUpdateListener = _itemUpdateListener; } return(e); }