Creates a new TelnetTask instance.

Namespace: Jscape.Telnet
Assembly: Jscape.Telnet (in Jscape.Telnet.dll) Version: 2.6.1.0

Syntax

C#
public TelnetTask(
	string startPrompt,
	string command,
	string endPrompt
)
Visual Basic
Public Sub New ( _
	startPrompt As String, _
	command As String, _
	endPrompt As String _
)
Visual C++
public:
TelnetTask(
	String^ startPrompt, 
	String^ command, 
	String^ endPrompt
)

Parameters

startPrompt
Type: System..::..String
The shell prompt this task should wait for before executing the command.
command
Type: System..::..String
The command to execute.
endPrompt
Type: System..::..String
The end shell prompt this task should wait for to indicate that this task is finished.

Remarks

When creating a new TelnetTask you must, at a minimum, provide both the command and end prompt. In most cases a Start Prompt should be provided, although you may provide a null value in cases where you are not waiting for TELNET server data but want the command to be executed immediately.

Examples

To create a TelnetTask, pass in the start prompt, command, and end prompt.
CopyTelnetTask
// Create TelnetTask cd by passing start prompt, command, and end prompt
TelnetTask cd = new TelnetTask("$", "cd /", "$");

CopyTelnetTask
' Create TelnetTask cd by passing start prompt, command, and end prompt
Dim cd As TelnetTask = new TelnetTask("$", "cd /", "$")

See Also