PowerTCP SSH and SFTP for .NET
Execute(String,Object) Method




Command to execute.
Optional parameter useful for passing state information to the Data event in a COM environment.
Executes a command on the server.
Syntax
'Declaration
 
Public Overloads Function Execute( _
   ByVal command As String, _
   ByVal state As Object _
) As Data
'Usage
 
Dim instance As Ssh
Dim command As String
Dim state As Object
Dim value As Data
 
value = instance.Execute(command, state)
public Data Execute( 
   string command,
   object state
)
public: Data* Execute( 
   string* command,
   Object* state
) 
public:
Data^ Execute( 
   String^ command,
   Object^ state
) 

Parameters

command
Command to execute.
state
Optional parameter useful for passing state information to the Data event in a COM environment.

Return Value

A Data object containing the response from the server.
Remarks
This method is typically used for non-interactive applications and is threadsafe (commands may be executed concurrently on multiple threads). If Ssh.ThreadingModel is ThreadingModel.ApartmentAsync, this method immediately returns a null value after starting a worker thread that executes the operation asynchronously. The Data event is raised containing the result upon completion, or the Error event is raised if an exception is thrown.
See Also

Reference

Ssh Class
Ssh Members
Overload List


PowerTCP SSH and SFTP for .NET Documentation Version 7.0
© 2023 Dart Communications. All Rights Reserved.
Send comments on this topic