Scripting.ReadUntil Method
Namespace: Rebex.TerminalEmulation
Assembly: Rebex.Terminal.dll (version 7.0.9083)
ReadUntil(ScriptEvent)
Receives response from the server until the specified condition is met.
Declaration
public string ReadUntil(ScriptEvent scriptEvent)
Parameters
Type | Name | Description |
---|---|---|
ScriptEvent | scriptEvent | Condition to be met. |
Returns
Type | Description |
---|---|
String | The response received from the server. |
Remarks
If TrimReadUntilResponse property is set to true, the prompt sequence is removed from the returned value if it was one of the specified conditions.
ReadUntil(ScriptEvent[])
Reads the response from previously sent command until the criteria are met. The events are processed as if the OR operator was applied.
Declaration
public string ReadUntil(params ScriptEvent[] events)
Parameters
Type | Name | Description |
---|---|---|
ScriptEvent[] | events | Criteria to be met. |
Returns
Type | Description |
---|---|
String | Response of the previously sent command until the criteria are met. If ScriptEvent.Timeout was not set, it can throw timeout exception if the criteria are not met. |
Remarks
If TrimReadUntilResponse property is set to true, the prompt sequence is removed from the returned value if it was one of the specified conditions.