private void RunningDocTableEventsOnDocumentClosed(object sender, VsDocumentEventArgs e) { var path = e.Path; var info = _runningDocumentTable.GetDocumentInfo(path.Value); // Call handlers var document = GetTextDocument(info); if (document != null) { OnTextDocumentClosed(new TextDocumentEventArgs(document)); } // Remove from table lock (_openDocumentsLock) { _openDocuments.Remove(path); } }
private void RunningDocTableEventsOnDocumentOpened(object sender, VsDocumentEventArgs e) { var path = e.Path; var info = _runningDocumentTable.GetDocumentInfo(path.Value); // Call handlers var document = GetTextDocument(info); if (document != null) { document.FileActionOccurred += TextDocumentOnFileActionOccurred; // Add to table lock (_openDocumentsLock) { _openDocuments[path] = document; } // Call handlers OnTextDocumentOpened(new TextDocumentEventArgs(document)); } }
protected virtual void OnDocumentClosed(VsDocumentEventArgs e) { DocumentClosed?.Invoke(this, e); }