예제 #1
0
     public TestResponseModel Test(TestRequestModel model)
     {
 #if !SILVERLIGHT
         send_Test(model);
         return(recv_Test());
 #else
         var asyncResult = Begin_Test(null, null, model);
         return(End_Test(asyncResult));
 #endif
     }
예제 #2
0
            public void send_Test(TestRequestModel model)
      #endif
            {
                oprot_.WriteMessageBegin(new TMessage("Test", TMessageType.Call, seqid_));
                Test_args args = new Test_args();

                args.Model = model;
                args.Write(oprot_);
                oprot_.WriteMessageEnd();
        #if SILVERLIGHT
                return(oprot_.Transport.BeginFlush(callback, state));
        #else
                oprot_.Transport.Flush();
        #endif
            }
예제 #3
0
            public void Read(TProtocol iprot)
            {
                iprot.IncrementRecursionDepth();
                try
                {
                    TField field;
                    iprot.ReadStructBegin();
                    while (true)
                    {
                        field = iprot.ReadFieldBegin();
                        if (field.Type == TType.Stop)
                        {
                            break;
                        }
                        switch (field.ID)
                        {
                        case 1:
                            if (field.Type == TType.Struct)
                            {
                                Model = new TestRequestModel();
                                Model.Read(iprot);
                            }
                            else
                            {
                                TProtocolUtil.Skip(iprot, field.Type);
                            }
                            break;

                        default:
                            TProtocolUtil.Skip(iprot, field.Type);
                            break;
                        }
                        iprot.ReadFieldEnd();
                    }
                    iprot.ReadStructEnd();
                }
                finally
                {
                    iprot.DecrementRecursionDepth();
                }
            }
예제 #4
0
 public IAsyncResult Begin_Test(AsyncCallback callback, object state, TestRequestModel model)
 {
     return(send_Test(callback, state, model));
 }
예제 #5
0
 public IAsyncResult send_Test(AsyncCallback callback, object state, TestRequestModel model)