Ejemplo n.º 1
0
        private void _HandleNotification(object sender, NotificationMessage e)
        {
            if (e.Method.Equals(EditorMethods.DidChangeConfiguration))
            {
                ConfigurationChanged?.Invoke(this, e.Params.ToObject <DidChangeConfigurationParams>());
            }

            else if (e.Method.Equals(EditorMethods.DidChangeTextDocument))
            {
                TextDocumentChanged?.Invoke(this, e.Params.ToObject <DidChangeTextDocumentParams>());
            }

            else if (e.Method.Equals(EditorMethods.DidChangeWatchedFiles))
            {
                WatchedFilesChanged?.Invoke(this, e.Params.ToObject <DidChangeWatchedFilesParams>());
            }

            else if (e.Method.Equals(EditorMethods.DidCloseTextDocument))
            {
                TextDocumentClosed?.Invoke(this, e.Params.ToObject <DidCloseTextDocumentParams>());
            }

            else if (e.Method.Equals(EditorMethods.DidOpenTextDocument))
            {
                TextDocumentOpened?.Invoke(this, e.Params.ToObject <DidOpenTextDocumentParams>());
            }

            else if (e.Method.Equals(EditorMethods.DidSaveTextDocument))
            {
                TextDocumentSaved?.Invoke(this, e.Params.ToObject <DidSaveTextDocumentParams>());
            }
        }
Ejemplo n.º 2
0
 protected virtual void OnTextDocumentOpened(TextDocumentEventArgs e)
 {
     Logger.WrapActionInvocation(() => { TextDocumentOpened?.Invoke(this, e); });
 }