Exemplo n.º 1
0
            public void testM1_Process(int seqid, TProtocol iprot, TProtocol oprot)
            {
                testM1_args args = new testM1_args();

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

                try
                {
                    result.Success = iface_.testM1(args.Num1, args.Num2);
                    oprot.WriteMessageBegin(new TMessage("testM1", 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("testM1", TMessageType.Exception, seqid));
                    x.Write(oprot);
                }
                oprot.WriteMessageEnd();
                oprot.Transport.Flush();
            }
Exemplo n.º 2
0
            public void send_testM1(int num1, int num2)
            {
                oprot_.WriteMessageBegin(new TMessage("testM1", TMessageType.Call, seqid_));
                testM1_args args = new testM1_args();

                args.Num1 = num1;
                args.Num2 = num2;
                args.Write(oprot_);
                oprot_.WriteMessageEnd();
                oprot_.Transport.Flush();
            }
Exemplo n.º 3
0
            public IAsyncResult send_testM1(AsyncCallback callback, object state, int num1, int num2)
            {
                oprot_.WriteMessageBegin(new TMessage("testM1", TMessageType.Call, seqid_));
                testM1_args args = new testM1_args();

                args.Num1 = num1;
                args.Num2 = num2;
                args.Write(oprot_);
                oprot_.WriteMessageEnd();
                return(oprot_.Transport.BeginFlush(callback, state));
            }