public void ban_Process(int seqid, TProtocol iprot, TProtocol oprot) { ban_args args = new ban_args(); args.Read(iprot); iprot.ReadMessageEnd(); ban_result result = new ban_result(); try { result.Success = iface_.ban(args.AuthString, args.Name); } catch (org.phybros.thrift.EAuthException aex) { result.Aex = aex; } catch (org.phybros.thrift.EDataException dex) { result.Dex = dex; } oprot.WriteMessageBegin(new TMessage("ban", TMessageType.Reply, seqid)); result.Write(oprot); oprot.WriteMessageEnd(); oprot.Transport.Flush(); }
public bool recv_ban() { TMessage msg = iprot_.ReadMessageBegin(); if (msg.Type == TMessageType.Exception) { TApplicationException x = TApplicationException.Read(iprot_); iprot_.ReadMessageEnd(); throw x; } ban_result result = new ban_result(); result.Read(iprot_); iprot_.ReadMessageEnd(); if (result.__isset.success) { return result.Success; } if (result.__isset.aex) { throw result.Aex; } if (result.__isset.dex) { throw result.Dex; } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "ban failed: unknown result"); }