public void Append(Guid id, ICliSession cliSession) { _cliSessions.Add(id, cliSession); cliSession.Output = (s, c, e) => Push(new TerminalOutputEvent { TerminalId = id, Output = s, CurrentPath = cliSession.CurrentPath, ConnectionId = ConnectionId, CorrelationId = c, EndOfCommand = e }); }
public void Append(Guid id, ICliSession cliSession) { _cliSessions.Add(id, cliSession); cliSession.Output = (s,c,e) => this.Push(new TerminalOutputEvent() { TerminalId= id, Output= s, CurrentPath = cliSession.CurrentPath, ConnectionId = ConnectionId, CorrelationId = c, EndOfCommand = e }); }
public void Consume(TerminalInputRequest message) { UserConnection connection = _connections.GetConnection(message.ConnectionId); if (connection == null) { throw new ArgumentException("Connection does not exist"); } ICliSession cli = connection.GetTerminalSession(message.TerminalId); if (cli == null) { throw new ArgumentException("CLI does not exist"); } cli.Input(message.Input, message.CorrelationId); }