/// <summary>Send command QTM server and expect a XML response packet</summary> /// <param name="command">Command to send</param> /// <param name="xml">Returned xml data string</param> /// <returns>true if command was sent successfully</returns> public bool SendCommandExpectXMLResponse(string command, out string xml) { if (SendString(command, PacketType.PacketCommand)) { Thread.Sleep(50); PacketType packetType; while (ReceiveRTPacket(out packetType, true) > 0) { if (packetType != PacketType.PacketXML) { if (packetType == PacketType.PacketError) { xml = ""; mErrorString = mPacket.GetErrorString(); return(false); } } else { xml = mPacket.GetXMLString(); return(true); } } } xml = ""; return(false); }