Esempio n. 1
0
        private void RunningDocTableEventsOnDocumentRenamed(object sender, DocumentRenamedEventArgs e)
        {
            // Find document from out table, ignore if not found
            var document = TryLookupDocument(e.OldPath);

            if (document == null)
            {
                Logger.LogInfo("A document we don't know about was renamed: \"{0}\"", e.OldPath);
                return;
            }

            // Update table (before invoking handlers)
            lock (_openDocumentsLock) {
                _openDocuments[e.NewPath] = document;
                _openDocuments.Remove(e.OldPath);
            }

            OnTextDocumentRenamed(new TextDocumentRenamedEventArgs(document, e.OldPath, e.NewPath));
        }
 protected virtual void OnDocumentRenamed(DocumentRenamedEventArgs e)
 {
     DocumentRenamed?.Invoke(this, e);
 }