public void Dispose() { var a = _viewerAutomation as IDisposable; if (a != null) { a.Dispose(); } _studyLocatorBridge.Dispose(); }
/// <summary> /// Implementation of the Dispose pattern. /// </summary> protected virtual void Dispose(bool disposing) { if (disposing) { if (_viewerAutomationClient != null && _viewerAutomationClient is IDisposable) { ((IDisposable)_viewerAutomationClient).Dispose(); _viewerAutomationClient = null; } if (_studyRootQueryBridge != null) { _studyRootQueryBridge.Dispose(); _studyRootQueryBridge = null; } if (_studyLocatorBridge != null) { _studyLocatorBridge.Dispose(); _studyLocatorBridge = null; } } }