public void ExitNotification()
        {
            ExitNotification exitNotification =
                new ExitNotification();
            Notification_Message notificationMessage = new Notification_Message("exit", exitNotification);
            string json          = JsonConvert.SerializeObject(notificationMessage);
            string headerAndJson = "Content-Length: " + (json.Length) + "\r\n\r\n" + json;

            tcpManager.Send(headerAndJson);
        }
        public void InitializedNotification()
        {
            InitializedNotification initRequest =
                new InitializedNotification();
            Notification_Message initializeNotification =
                new Notification_Message("initialized", initRequest);
            string json          = JsonConvert.SerializeObject(initializeNotification);
            string headerAndJson = "Content-Length: " + (json.Length) + "\r\n\r\n" + json;

            tcpManager.Send(headerAndJson);
        }
        public void DidCloseNotification(string uri)
        {
            DidCloseTextDocument document =
                new ConcreteDidCloseTextDocument(new ConcreteTextDocumentIdentifier(uri));
            Notification_Message notificationMessage =
                new Notification_Message("textDocument/didClose", document);
            string json          = JsonConvert.SerializeObject(notificationMessage);
            string headerAndJson = "Content-Length: " + (json.Length) + "\r\n\r\n" + json;

            tcpManager.Send(headerAndJson);
        }
        public void DidChangeNotification(VersionedTextDocumentIdentifier versionedTextDocumentIdentifier,
                                          IEnumerable <TextDocumentContentChangeEvent> contentchangesEvents)
        {
            DidChangeTextDocument document =
                new ConcreteDidChangeTextDocument(versionedTextDocumentIdentifier,
                                                  contentchangesEvents);
            Notification_Message notificationMessage =
                new Notification_Message("textDocument/didChange", document);
            string json          = JsonConvert.SerializeObject(notificationMessage);
            string headerAndJson = "Content-Length: " + (json.Length) + "\r\n\r\n" + json;

            tcpManager.Send(headerAndJson);
        }
        public void DidOpenNotification(string uri, string language, int version, string text)
        {
            text = text.Replace("\r", "");
            DidOpenTextDocument document =
                new ConcreteDidOpenTextDocument(new TextDocument(uri, language, version, text));
            Notification_Message notificationMessage =
                new Notification_Message("textDocument/didOpen", document);

            string json          = JsonConvert.SerializeObject(notificationMessage);
            string headerAndJson = "Content-Length: " + (json.Length) + "\r\n\r\n" + json;

            tcpManager.Send(headerAndJson);
        }