void client_OnReceivedMessage(object sender, ReceivedMessageEventArgs e) { lock (_sync) { int CrlfPosition = e.Message.LastIndexOf("\r\n"); if (CrlfPosition > 0) { _runResult = e.Message.Remove(CrlfPosition); } else { _runResult = e.Message; } _waitForCommand = false; } }
void client_OnReceivedMessage(object sender, ReceivedMessageEventArgs e) { lock (_sync) { int CrlfPosition = e.Message.LastIndexOf("\r\n"); if(CrlfPosition>0) _runResult = e.Message.Remove(CrlfPosition); else _runResult = e.Message; _waitForCommand = false; } }