public void Dispose()
        {
            GC.SuppressFinalize(this);

            if (_viewer != null && !_viewer.IsClosed)
            {
                _viewer.Close();
            }

            _viewer = null;
        }
示例#2
0
        // VS editor will call Dispose at which point we should Close() the embedded IWpfDifferenceViewer.
        protected virtual void Dispose(bool disposing)
        {
            if (!_disposedValue)
            {
                if (disposing && (_previewDiffViewer != null) && !_previewDiffViewer.IsClosed)
                {
                    _previewDiffViewer.Close();
                }
            }

            _disposedValue = true;
        }