Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
        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);
        }