public void getRandomAd_Process(int seqid, TProtocol iprot, TProtocol oprot) { getRandomAd_args args = new getRandomAd_args(); args.Read(iprot); iprot.ReadMessageEnd(); getRandomAd_result result = new getRandomAd_result(); try { result.Success = iface_.getRandomAd(args.AuthenticationToken, args.AdParameters); } catch (Evernote.EDAM.Error.EDAMUserException userException) { result.UserException = userException; } catch (Evernote.EDAM.Error.EDAMSystemException systemException) { result.SystemException = systemException; } oprot.WriteMessageBegin(new TMessage("getRandomAd", TMessageType.Reply, seqid)); result.Write(oprot); oprot.WriteMessageEnd(); oprot.Transport.Flush(); }
public Evernote.EDAM.Type.Ad recv_getRandomAd() { TMessage msg = iprot_.ReadMessageBegin(); if (msg.Type == TMessageType.Exception) { TApplicationException x = TApplicationException.Read(iprot_); iprot_.ReadMessageEnd(); throw x; } getRandomAd_result result = new getRandomAd_result(); result.Read(iprot_); iprot_.ReadMessageEnd(); if (result.__isset.success) { return result.Success; } if (result.__isset.userException) { throw result.UserException; } if (result.__isset.systemException) { throw result.SystemException; } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "getRandomAd failed: unknown result"); }