Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
        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));
            }
        }
Ejemplo n.º 3
0
 protected virtual void OnDocumentClosed(VsDocumentEventArgs e)
 {
     DocumentClosed?.Invoke(this, e);
 }