Beispiel #1
0
            public void send_GetSomeWork(string BakerID)
      #endif
            {
                oprot_.WriteMessageBegin(new TMessage("GetSomeWork", TMessageType.Call, seqid_));
                GetSomeWork_args args = new GetSomeWork_args();

                args.BakerID = BakerID;
                args.Write(oprot_);
                oprot_.WriteMessageEnd();
        #if SILVERLIGHT
                return(oprot_.Transport.BeginFlush(callback, state));
        #else
                oprot_.Transport.Flush();
        #endif
            }
Beispiel #2
0
            public void GetSomeWork_Process(int seqid, TProtocol iprot, TProtocol oprot)
            {
                GetSomeWork_args args = new GetSomeWork_args();

                args.Read(iprot);
                iprot.ReadMessageEnd();
                GetSomeWork_result result = new GetSomeWork_result();

                try
                {
                    try
                    {
                        result.Success = iface_.GetSomeWork(args.BakerID);
                    }
                    catch (EPizzeria error)
                    {
                        result.Error = error;
                    }
                    oprot.WriteMessageBegin(new TMessage("GetSomeWork", 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("GetSomeWork", TMessageType.Exception, seqid));
                    x.Write(oprot);
                }
                oprot.WriteMessageEnd();
                oprot.Transport.Flush();
            }