public void Add_Process(int seqid, TProtocol iprot, TProtocol oprot) { Add_args args = new Add_args(); args.Read(iprot); iprot.ReadMessageEnd(); Add_result result = new Add_result(); try { result.Success = iface_.@Add(args.I1, args.I2); oprot.WriteMessageBegin(new TMessage("Add", 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("Add", TMessageType.Exception, seqid)); x.Write(oprot); } oprot.WriteMessageEnd(); oprot.Transport.Flush(); }