public void PullAutomationCommands() { try { string name = "npp.css.ide.commands." + remoteProcessId; using (var pipeServer = new NamedPipeServerStream(name, PipeDirection.In)) using (var streamReader = new StreamReader(pipeServer)) { pipeServer.WaitForConnection(); while (true) { string message = streamReader.ReadLine(); Debug.WriteLine(message); MessageQueue.AddAutomationCommand(message); } } } catch (IOException e) { Notify("ERROR: " + e.Message); } }
static void CloseAutomationChannel() { MessageQueue.AddAutomationCommand("automation.exit"); }