public void getRegionImg_Process(int seqid, TProtocol iprot, TProtocol oprot) { getRegionImg_args args = new getRegionImg_args(); args.Read(iprot); iprot.ReadMessageEnd(); getRegionImg_result result = new getRegionImg_result(); try { try { result.Success = iface_.getRegionImg(args.Channel, args.X0, args.Y0, args.X1, args.Y1); } catch (ICWException ex) { result.Ex = ex; } oprot.WriteMessageBegin(new TMessage("getRegionImg", 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("getRegionImg", TMessageType.Exception, seqid)); x.Write(oprot); } oprot.WriteMessageEnd(); oprot.Transport.Flush(); }
public byte[] recv_getRegionImg() { TMessage msg = iprot_.ReadMessageBegin(); if (msg.Type == TMessageType.Exception) { TApplicationException x = TApplicationException.Read(iprot_); iprot_.ReadMessageEnd(); throw x; } getRegionImg_result result = new getRegionImg_result(); result.Read(iprot_); iprot_.ReadMessageEnd(); if (result.__isset.success) { return(result.Success); } if (result.__isset.ex) { throw result.Ex; } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "getRegionImg failed: unknown result"); }