/// <summary> /// Implementation of the Dispose pattern. /// </summary> protected virtual void Dispose(bool disposing) { if (disposing) { if (_client != null && _client is IDisposable) { ((IDisposable)_client).Dispose(); _client = null; } } }
public void Dispose() { if (_studyRootQuery == null) { return; } var disposable = _studyRootQuery as IDisposable; if (disposable == null) { return; } disposable.Dispose(); _studyRootQuery = null; }
/// <summary> /// Constructor. /// </summary> public ViewerAutomationBridge(IViewerAutomation viewerAutomationClient, IStudyRootQuery studyRootQueryClient) : this(viewerAutomationClient, new StudyRootQueryBridge(studyRootQueryClient)) { }
public StudyRootQueryStoreAdapter(IStudyRootQuery studyRootQuery) { Platform.CheckForNullReference(studyRootQuery, "studyRootQuery"); _studyRootQuery = studyRootQuery; }
/// <summary> /// Constructor. /// </summary> /// <param name="client">The implementation of <see cref="IStudyRootQuery"/> this bridge will use.</param> public StudyRootQueryBridge(IStudyRootQuery client) { Platform.CheckForNullReference(client, "client"); _client = client; _studyComparer = new StudyDateTimeComparer(); }
public void Dispose() { if (_studyRootQuery == null) return; var disposable = _studyRootQuery as IDisposable; if (disposable == null) return; disposable.Dispose(); _studyRootQuery = null; }