From 9a75f086686ce21f6ff908c29b288e61de796cf6 Mon Sep 17 00:00:00 2001 From: olegkap_cp Date: Tue, 28 Dec 2010 15:55:29 +0000 Subject: [PATCH] Add new CreateCommand method to create new command with specified encoding. --- Renci.SshClient/Renci.SshClient/SshClient.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Renci.SshClient/Renci.SshClient/SshClient.cs b/Renci.SshClient/Renci.SshClient/SshClient.cs index 677b05d2..fb587aa8 100644 --- a/Renci.SshClient/Renci.SshClient/SshClient.cs +++ b/Renci.SshClient/Renci.SshClient/SshClient.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.IO; using System.Collections.ObjectModel; +using System.Text; namespace Renci.SshClient { @@ -136,12 +137,24 @@ namespace Renci.SshClient /// Creates the command to be executed. /// /// The command text. - /// + /// object. public SshCommand CreateCommand(string commandText) { return new SshCommand(this.Session, commandText); } + /// + /// Creates the command to be executed with specified encoding. + /// + /// The command text. + /// The encoding to use for results. + /// object which uses specified encoding. + public SshCommand CreateCommand(string commandText, Encoding encoding) + { + return new SshCommand(this.Session, commandText, encoding); + } + + /// /// Creates and executes the command. ///