protected virtual void Dispose(bool disposing) { lock (this._disposeThreadSafetyLock) { if (!this._disposed) { this._disposed = true; } else { return; } } if (disposing) { this._handle.Dispose(); CimApplication.RemoveTracking(this); } }
protected virtual void Dispose(bool disposing) { if (!this._disposed) { if (disposing) { this.Close(); if (this._cancellationTokenRegistration != null) { this._cancellationTokenRegistration.Dispose(); this._cancellationTokenRegistration = null; } CimApplication.RemoveTracking(this); } this._disposed = true; return; } else { return; } }