コード例 #1
0
            public void Update_Process(int seqid, TProtocol iprot, TProtocol oprot)
            {
                Update_args args = new Update_args();

                args.Read(iprot);
                iprot.ReadMessageEnd();
                Update_result result = new Update_result();

                try
                {
                    iface_.Update(args.Person);
                    oprot.WriteMessageBegin(new TMessage("Update", 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("Update", TMessageType.Exception, seqid));
                    x.Write(oprot);
                }
                oprot.WriteMessageEnd();
                oprot.Transport.Flush();
            }
コード例 #2
0
            public void Update_Process(int seqid, TProtocol iprot, TProtocol oprot)
            {
                Update_args args = new Update_args();

                args.Read(iprot);
                iprot.ReadMessageEnd();
                Update_result result = new Update_result();

                iface_.Update(args.Res);
                oprot.WriteMessageBegin(new TMessage("Update", TMessageType.Reply, seqid));
                result.Write(oprot);
                oprot.WriteMessageEnd();
                oprot.Transport.Flush();
            }