/// <summary> /// 重置子类绑定事件 /// </summary> protected virtual void InitializeChangeEvent() { if (!_isDisableEvent) { _itemEvent = new CacheItemChangeEvent(); _childrenEvent = new CacheItemChangeEvent(); } }
/// <summary> /// 重置子类绑定事件 /// </summary> protected virtual void InitializeChangeEvent() { if (!_isDisableEvent) { _itemEvent = new CacheItemChangeEvent(); _childrenEvent = new CacheItemChangeEvent(); } }
/// <summary> /// /// </summary> protected override void Dispose(bool disposing) { if (disposing) { //释放 托管资源 if (_itemEvent != null) { _itemEvent.Dispose(); _itemEvent = null; } if (_childrenEvent != null) { _childrenEvent.Dispose(); _childrenEvent = null; } } base.Dispose(disposing); }
/// <summary> /// 设置禁用事件绑定 /// </summary> protected void SetDisableEvent() { _isDisableEvent = true; if (_itemEvent != null) { ItemEvent.Dispose(); _itemEvent = null; } if (_childrenEvent != null) { ChildrenEvent.Dispose(); _childrenEvent = null; } }
/// <summary> /// /// </summary> protected override void Dispose(bool disposing) { if (disposing) { //释放 托管资源 _itemEvent = null; _childrenEvent = null; } base.Dispose(disposing); }
/// <summary> /// 清除子类事件句柄 /// </summary> internal void ClearChildrenEvent() { _childrenEvent = new CacheItemChangeEvent(); }
/// <summary> /// /// </summary> protected override void Dispose(bool disposing) { if (disposing) { Interlocked.Exchange(ref _lockFlag, 0); //释放 托管资源 _itemEvent = null; _childrenEvent = null; } base.Dispose(disposing); }