public void Test_Process(int seqid, TProtocol iprot, TProtocol oprot) { Test_args args = new Test_args(); args.Read(iprot); iprot.ReadMessageEnd(); Test_result result = new Test_result(); try { result.Success = iface_.Test(args.Model); oprot.WriteMessageBegin(new TMessage("Test", TMessageType.Reply, seqid)); result.Write(oprot); } catch (TTransportException) { throw; } catch (Exception ex) { Console.Error.WriteLine("Error occurred in processor:"); Console.Error.WriteLine(ex.ToString()); TApplicationException x = new TApplicationException(TApplicationException.ExceptionType.InternalError, " Internal error."); oprot.WriteMessageBegin(new TMessage("Test", TMessageType.Exception, seqid)); x.Write(oprot); } oprot.WriteMessageEnd(); oprot.Transport.Flush(); }
protected void tsRsult_Save(string position, string newID) { DataRow[] temp = _ts.getList(" position_id='" + position + "' "); if (temp.Length > 0) { Test_result ts_result = new Test_result(); ts_result.DelList(position); int i = 1; foreach (DataRow Item in temp) { string position_id = newID; string rowid = Guid.NewGuid().ToString(); string cav = Item["cav"].ToString(); string measurement = Item["measurement"].ToString(); ts_result.Add(rowid, position_id, cav, measurement, i); Item["position_id"] = position_id; Item["rowid"] = rowid; i++; } } }
public TestResponseModel recv_Test() { TMessage msg = iprot_.ReadMessageBegin(); if (msg.Type == TMessageType.Exception) { TApplicationException x = TApplicationException.Read(iprot_); iprot_.ReadMessageEnd(); throw x; } Test_result result = new Test_result(); result.Read(iprot_); iprot_.ReadMessageEnd(); if (result.__isset.success) { return(result.Success); } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "Test failed: unknown result"); }