public void recv_MealPrepared() { TMessage msg = iprot_.ReadMessageBegin(); if (msg.Type == TMessageType.Exception) { TApplicationException x = TApplicationException.Read(iprot_); iprot_.ReadMessageEnd(); throw x; } MealPrepared_result result = new MealPrepared_result(); result.Read(iprot_); iprot_.ReadMessageEnd(); if (result.__isset.error) { throw result.Error; } return; }
public void MealPrepared_Process(int seqid, TProtocol iprot, TProtocol oprot) { MealPrepared_args args = new MealPrepared_args(); args.Read(iprot); iprot.ReadMessageEnd(); MealPrepared_result result = new MealPrepared_result(); try { try { iface_.MealPrepared(args.OrderID, args.DishID, args.Quantity, args.BakerID); } catch (EPizzeria error) { result.Error = error; } oprot.WriteMessageBegin(new TMessage("MealPrepared", 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("MealPrepared", TMessageType.Exception, seqid)); x.Write(oprot); } oprot.WriteMessageEnd(); oprot.Transport.Flush(); }