Method ExpectResponse
ExpectResponse(string?, Action<string?>, Action?, bool)
Notifies the parser that you are expecting a response to come in
with the given terminator (i.e. because you have
sent an ANSI request out).
void ExpectResponse(string? terminator, Action<string?> response, Action? abandoned, bool persistent)
Parameters
terminatorstringThe terminator you expect to see on response.
responseAction<string>Callback to invoke when the response is seen in console input.
abandonedActionpersistentbooltrue if you want this to persist permanently and be raised for every event matching the
terminator.
Exceptions
- ArgumentException
If trying to register a persistent request for a terminator that already has one. exists.