private void CloseView(IDocumentView view) { if (view == null) { throw new ArgumentNullException("view"); } This.Logger.Verbose("Closing View."); view.Close(); if (view is IDisposable) { var document = view.Document; var viewInfo = document == null?view.GetType() : document.GetType(); This.Logger.Verbose(string.Format("Disposing view {0}", viewInfo)); ((IDisposable)view).Dispose(); } }
private void CloseView(IDocumentView view) { if (view == null) throw new ArgumentNullException("view"); This.Logger.Verbose("Closing View."); view.Close(); if (view is IDisposable) { var document = view.Document; var viewInfo = document == null ? view.GetType() : document.GetType(); This.Logger.Verbose(string.Format("Disposing view {0}", viewInfo)); ((IDisposable)view).Dispose(); } }