C# 클래스 Renci.SshNet.SshCommand

Represents SSH command that can be executed.
상속: IDisposable
파일 보기 프로젝트 열기: sshnet/SSH.NET 1 사용 예제들

공개 메소드들

메소드 설명
BeginExecute ( ) : IAsyncResult

Begins an asynchronous command execution.

BeginExecute ( AsyncCallback callback ) : IAsyncResult

Begins an asynchronous command execution.

BeginExecute ( AsyncCallback callback, object state ) : IAsyncResult

Begins an asynchronous command execution.

BeginExecute ( string commandText, AsyncCallback callback, object state ) : IAsyncResult

Begins an asynchronous command execution.

CancelAsync ( ) : void

Cancels command execution in asynchronous scenarios.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

EndExecute ( IAsyncResult asyncResult ) : string

Waits for the pending asynchronous command execution to complete.

Execute ( ) : string

Executes command specified by CommandText property.

Execute ( string commandText ) : string

Executes the specified command text.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources

비공개 메소드들

메소드 설명
Channel_Closed ( object sender, ChannelEventArgs e ) : void
Channel_DataReceived ( object sender, ChannelDataEventArgs e ) : void
Channel_ExtendedDataReceived ( object sender, ChannelExtendedDataEventArgs e ) : void
Channel_RequestReceived ( object sender, ChannelRequestEventArgs e ) : void
CreateChannel ( ) : IChannelSession
Session_Disconnected ( object sender, EventArgs e ) : void
Session_ErrorOccured ( object sender, ExceptionEventArgs e ) : void
SshCommand ( ISession session, string commandText, Encoding encoding ) : System

Initializes a new instance of the SshCommand class.

UnsubscribeFromEventsAndDisposeChannel ( IChannel channel ) : void

Unsubscribes the current SshCommand from channel events, and disposes the IChannel.

Does nothing when channel is null.

WaitOnHandle ( WaitHandle waitHandle ) : void The actual command will be included in the exception message.

메소드 상세

BeginExecute() 공개 메소드

Begins an asynchronous command execution.
Asynchronous operation is already in progress. Invalid operation. CommandText property is empty. Client is not connected. Operation has timed out. Asynchronous operation is already in progress. CommandText property is empty.
public BeginExecute ( ) : IAsyncResult
리턴 IAsyncResult

BeginExecute() 공개 메소드

Begins an asynchronous command execution.
Asynchronous operation is already in progress. Invalid operation. CommandText property is empty. Client is not connected. Operation has timed out. Asynchronous operation is already in progress. CommandText property is empty.
public BeginExecute ( AsyncCallback callback ) : IAsyncResult
callback AsyncCallback An optional asynchronous callback, to be called when the command execution is complete.
리턴 IAsyncResult

BeginExecute() 공개 메소드

Begins an asynchronous command execution.
Asynchronous operation is already in progress. Invalid operation. CommandText property is empty. Client is not connected. Operation has timed out. Asynchronous operation is already in progress. CommandText property is empty.
public BeginExecute ( AsyncCallback callback, object state ) : IAsyncResult
callback AsyncCallback An optional asynchronous callback, to be called when the command execution is complete.
state object A user-provided object that distinguishes this particular asynchronous read request from other requests.
리턴 IAsyncResult

BeginExecute() 공개 메소드

Begins an asynchronous command execution.
Client is not connected. Operation has timed out.
public BeginExecute ( string commandText, AsyncCallback callback, object state ) : IAsyncResult
commandText string The command text.
callback AsyncCallback An optional asynchronous callback, to be called when the command execution is complete.
state object A user-provided object that distinguishes this particular asynchronous read request from other requests.
리턴 IAsyncResult

CancelAsync() 공개 메소드

Cancels command execution in asynchronous scenarios.
public CancelAsync ( ) : void
리턴 void

Dispose() 공개 메소드

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Releases unmanaged and - optionally - managed resources
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
리턴 void

EndExecute() 공개 메소드

Waits for the pending asynchronous command execution to complete.
Either the IAsyncResult object did not come from the corresponding async method on this type, or EndExecute was called multiple times with the same IAsyncResult. is null.
public EndExecute ( IAsyncResult asyncResult ) : string
asyncResult IAsyncResult The reference to the pending asynchronous request to finish.
리턴 string

Execute() 공개 메소드

Executes command specified by CommandText property.
Client is not connected. Operation has timed out.
public Execute ( ) : string
리턴 string

Execute() 공개 메소드

Executes the specified command text.
Client is not connected. Operation has timed out.
public Execute ( string commandText ) : string
commandText string The command text.
리턴 string