Creates a new TelnetTask instance.
Namespace: Jscape.TelnetAssembly: Jscape.Telnet (in Jscape.Telnet.dll) Version: 2.6.1.0
Syntax
C# |
---|
public TelnetTask( string name, string startPrompt, string command, string endPrompt ) |
Visual Basic |
---|
Public Sub New ( _ name As String, _ startPrompt As String, _ command As String, _ endPrompt As String _ ) |
Visual C++ |
---|
public: TelnetTask( String^ name, String^ startPrompt, String^ command, String^ endPrompt ) |
Parameters
- name
- Type: System..::..String
The name of this task.
- 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 a task name, the start prompt, command, and end prompt.
CopyTelnetTask
CopyTelnetTask

// Create TelnetTask cd by passing task name, start prompt, command, and end prompt TelnetTask cd = new TelnetTask("chgdir", "$", "cd /", "$");

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