public static TestDescription ReadATestDescription(StreamReader sr) { string lineBuf = ""; string data = ""; while (lineBuf != null && lineBuf != TRANSFER_START) { lineBuf = sr.ReadLine(); } if (lineBuf == null) { throw new IOException(); } while (true) { lineBuf = sr.ReadLine(); if (lineBuf == null || lineBuf == TRANSFER_STOP) { break; } data += lineBuf; } if (lineBuf == null) { throw new IOException(); } return(XmlProcessing.DeserializeFromXml <TestDescription>(data)); }
public static void SendATestDescription(StreamWriter sw, TestDescription testDescription) { SendData(sw, XmlProcessing.SerializeToXml(testDescription)); }