Пример #1
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.I64) {
             CustomerId = iprot.ReadI64();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 2:
           if (field.Type == TType.Struct) {
             Account = new Account();
             Account.Read(iprot);
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         default: 
           TProtocolUtil.Skip(iprot, field.Type);
           break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
   }
   finally
   {
     iprot.DecrementRecursionDepth();
   }
 }
Пример #2
0
 public long CreateAccount(long customerId, Account account)
 {
     return 123;
 }
Пример #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 0:
           if (field.Type == TType.List) {
             {
               Success = new List<Account>();
               TList _list0 = iprot.ReadListBegin();
               for( int _i1 = 0; _i1 < _list0.Count; ++_i1)
               {
                 Account _elem2;
                 _elem2 = new Account();
                 _elem2.Read(iprot);
                 Success.Add(_elem2);
               }
               iprot.ReadListEnd();
             }
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         default: 
           TProtocolUtil.Skip(iprot, field.Type);
           break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
   }
   finally
   {
     iprot.DecrementRecursionDepth();
   }
 }
Пример #4
0
 public void send_CreateAccount(long customerId, Account account)
 #endif
 {
   oprot_.WriteMessageBegin(new TMessage("CreateAccount", TMessageType.Call, seqid_));
   CreateAccount_args args = new CreateAccount_args();
   args.CustomerId = customerId;
   args.Account = account;
   args.Write(oprot_);
   oprot_.WriteMessageEnd();
   #if SILVERLIGHT
   return oprot_.Transport.BeginFlush(callback, state);
   #else
   oprot_.Transport.Flush();
   #endif
 }
Пример #5
0
 public IAsyncResult send_CreateAccount(AsyncCallback callback, object state, long customerId, Account account)
Пример #6
0
      public long CreateAccount(long customerId, Account account)
      {
        #if !SILVERLIGHT
        send_CreateAccount(customerId, account);
        return recv_CreateAccount();

        #else
        var asyncResult = Begin_CreateAccount(null, null, customerId, account);
        return End_CreateAccount(asyncResult);

        #endif
      }
Пример #7
0
 public IAsyncResult Begin_CreateAccount(AsyncCallback callback, object state, long customerId, Account account)
 {
   return send_CreateAccount(callback, state, customerId, account);
 }