private string TestTran(string input, AHostCommand HC) { MessageResponse retMsg; Message.Message msg = new Message.Message(input); string trailingChars = ""; if (ExpectTrailers()) { trailingChars = msg.GetTrailers(); } HC.AcceptMessage(msg); if (HC.XMLParseResult != ErrorCodes.ER_00_NO_ERROR) { retMsg = new MessageResponse(); retMsg.AddElement(HC.XMLParseResult); } else { retMsg = HC.ConstructResponse(); } retMsg.AddElement(trailingChars); HC.Terminate(); HC = null; return(retMsg.MessageData); }
private string TestMessage(string message, AHostCommand command) { var msg = new StreamMessage(message); command.AcceptMessage(msg); if (command.XmlParseResult != ErrorCodes.ER_00_NO_ERROR) { return(command.XmlParseResult); } var rsp = command.ConstructResponse(); return(rsp.GetBytes().GetString()); }
private void TestMessageWithIo(string message, AHostCommand command, out string rsp, out string rspAfterIo) { var msg = new StreamMessage(message); command.AcceptMessage(msg); if (command.XmlParseResult != ErrorCodes.ER_00_NO_ERROR) { rsp = command.XmlParseResult; rspAfterIo = string.Empty; return; } rsp = command.ConstructResponse().Message; rspAfterIo = command.ConstructResponseAfterIo().Message; }