Add new CreateCommand method to create new command with specified encoding.

This commit is contained in:
olegkap_cp
2010-12-28 15:55:29 +00:00
parent a1b4d08009
commit 9a75f08668
+14 -1
View File
@@ -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.
/// </summary>
/// <param name="commandText">The command text.</param>
/// <returns></returns>
/// <returns><see cref="SshCommand"/> object.</returns>
public SshCommand CreateCommand(string commandText)
{
return new SshCommand(this.Session, commandText);
}
/// <summary>
/// Creates the command to be executed with specified encoding.
/// </summary>
/// <param name="commandText">The command text.</param>
/// <param name="encoding">The encoding to use for results.</param>
/// <returns><see cref="SshCommand"/> object which uses specified encoding.</returns>
public SshCommand CreateCommand(string commandText, Encoding encoding)
{
return new SshCommand(this.Session, commandText, encoding);
}
/// <summary>
/// Creates and executes the command.
/// </summary>