public static ClientBase Create(ClientTypes type, ClientAuthorition authorition) { switch (type) { case ClientTypes.SSH: return(new SSHClient(authorition)); default: throw new NotImplementedException(); } }
private void RunSSHClient(SSHClientAuthorition authorition, IVideoTerminal terminal) { this.authorition = authorition; this.terminal = terminal; this.terminal.InputEvent += this.Terminal_InputEvent; this.vtParser = new VTParser(); this.vtParser.ActionEvent += VtParser_ActionEvent; this.vtParser.Initialize(); this.client = ClientFactory.CreateSSHClient(authorition.ServerAddress, authorition.ServerPort, authorition.UserName, authorition.Password); this.client.StatusChanged += this.Client_StatusChanged; this.client.DataReceived += this.Client_DataReceived; this.client.Connect(); }
public SSHClient(ClientAuthorition authorition) : base(authorition) { }
public ClientBase(ClientAuthorition authorition) { this.Authorition = authorition; }
public SerialPortClient(ClientAuthorition authorition) : base(authorition) { }
public static ClientBase CreateSSHClient(string ip, int port, string userName, string password) { ClientAuthorition authorition = CreateSSHClientAuthorition(ip, port, userName, password); return(ClientFactory.Create(ClientTypes.SSH, authorition)); }