private void ReleaseTerminal()
 {
     TerminalConnection?.Dispose();
     TerminalConnection = null;
 }
 internal void ConnectTo(ITerminal terminal, ITerminalResource resource)
 {
     ReleaseTerminal();
     TerminalConnection = new WebSocketConnection(this, terminal, resource);
 }