public void Query_Process(int seqid, TProtocol iprot, TProtocol oprot) { Query_args args = new Query_args(); args.Read(iprot); iprot.ReadMessageEnd(); Query_result result = new Query_result(); try { result.Success = iface_.Query(args.Id); oprot.WriteMessageBegin(new TMessage("Query", 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("Query", TMessageType.Exception, seqid)); x.Write(oprot); } oprot.WriteMessageEnd(); oprot.Transport.Flush(); }
public void send_Query(int id) { oprot_.WriteMessageBegin(new TMessage("Query", TMessageType.Call, seqid_)); Query_args args = new Query_args(); args.Id = id; args.Write(oprot_); oprot_.WriteMessageEnd(); oprot_.Transport.Flush(); }
public IAsyncResult send_Query(AsyncCallback callback, object state, int id) { oprot_.WriteMessageBegin(new TMessage("Query", TMessageType.Call, seqid_)); Query_args args = new Query_args(); args.Id = id; args.Write(oprot_); oprot_.WriteMessageEnd(); return(oprot_.Transport.BeginFlush(callback, state)); }