public void SayHello_Process(int seqid, TProtocol iprot, TProtocol oprot) { SayHello_args args = new SayHello_args(); args.Read(iprot); iprot.ReadMessageEnd(); SayHello_result result = new SayHello_result(); try { result.Success = iface_.SayHello(args.Name); oprot.WriteMessageBegin(new TMessage("SayHello", 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("SayHello", TMessageType.Exception, seqid)); x.Write(oprot); } oprot.WriteMessageEnd(); oprot.Transport.Flush(); }
public void SayHello_Process(int seqid, TProtocol iprot, TProtocol oprot) { SayHello_args args = new SayHello_args(); args.Read(iprot); iprot.ReadMessageEnd(); try { iface_.SayHello(args.Msg); } catch (TTransportException) { throw; } catch (Exception ex) { Console.Error.WriteLine("Error occurred in processor:"); Console.Error.WriteLine(ex.ToString()); } }