Ejemplo n.º 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.String) {
             Id = iprot.ReadString();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         default: 
           TProtocolUtil.Skip(iprot, field.Type);
           break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
   }
   finally
   {
     iprot.DecrementRecursionDepth();
   }
 }
Ejemplo n.º 2
0
 public void Write(TProtocol oprot) {
   oprot.IncrementRecursionDepth();
   try
   {
     TStruct struc = new TStruct("ReqChannelInfo");
     oprot.WriteStructBegin(struc);
     oprot.WriteFieldStop();
     oprot.WriteStructEnd();
   }
   finally
   {
     oprot.DecrementRecursionDepth();
   }
 }
Ejemplo n.º 3
0
 public void Write(TProtocol oprot) {
   oprot.IncrementRecursionDepth();
   try
   {
     TStruct struc = new TStruct("AnsCancelRequestMatch");
     oprot.WriteStructBegin(struc);
     oprot.WriteFieldStop();
     oprot.WriteStructEnd();
   }
   finally
   {
     oprot.DecrementRecursionDepth();
   }
 }
Ejemplo n.º 4
0
 public void Read (TProtocol iprot)
 {
   iprot.IncrementRecursionDepth();
   try
   {
     bool isset_msgType = false;
     TField field;
     iprot.ReadStructBegin();
     while (true)
     {
       field = iprot.ReadFieldBegin();
       if (field.Type == TType.Stop) { 
         break;
       }
       switch (field.ID)
       {
         case 1:
           if (field.Type == TType.I32) {
             MsgType = (VariableType)iprot.ReadI32();
             isset_msgType = true;
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 2:
           if (field.Type == TType.Bool) {
             BoolVal = iprot.ReadBool();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 3:
           if (field.Type == TType.Byte) {
             ByteVal = iprot.ReadByte();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 4:
           if (field.Type == TType.I32) {
             IntVal = iprot.ReadI32();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 5:
           if (field.Type == TType.Double) {
             DoubleVal = iprot.ReadDouble();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 6:
           if (field.Type == TType.String) {
             StrVal = iprot.ReadString();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 7:
           if (field.Type == TType.String) {
             ByteArrVal = iprot.ReadBinary();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 8:
           if (field.Type == TType.Map) {
             {
               MapVal = new Dictionary<BaseMsg, BaseMsg>();
               TMap _map0 = iprot.ReadMapBegin();
               for( int _i1 = 0; _i1 < _map0.Count; ++_i1)
               {
                 BaseMsg _key2;
                 BaseMsg _val3;
                 _key2 = new BaseMsg();
                 _key2.Read(iprot);
                 _val3 = new BaseMsg();
                 _val3.Read(iprot);
                 MapVal[_key2] = _val3;
               }
               iprot.ReadMapEnd();
             }
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 9:
           if (field.Type == TType.List) {
             {
               ListVal = new List<BaseMsg>();
               TList _list4 = iprot.ReadListBegin();
               for( int _i5 = 0; _i5 < _list4.Count; ++_i5)
               {
                 BaseMsg _elem6;
                 _elem6 = new BaseMsg();
                 _elem6.Read(iprot);
                 ListVal.Add(_elem6);
               }
               iprot.ReadListEnd();
             }
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 10:
           if (field.Type == TType.Set) {
             {
               SetVal = new THashSet<BaseMsg>();
               TSet _set7 = iprot.ReadSetBegin();
               for( int _i8 = 0; _i8 < _set7.Count; ++_i8)
               {
                 BaseMsg _elem9;
                 _elem9 = new BaseMsg();
                 _elem9.Read(iprot);
                 SetVal.Add(_elem9);
               }
               iprot.ReadSetEnd();
             }
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         default: 
           TProtocolUtil.Skip(iprot, field.Type);
           break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
     if (!isset_msgType)
       throw new TProtocolException(TProtocolException.INVALID_DATA);
   }
   finally
   {
     iprot.DecrementRecursionDepth();
   }
 }
Ejemplo n.º 5
0
 public void Write(TProtocol oprot) {
   oprot.IncrementRecursionDepth();
   try
   {
     TStruct struc = new TStruct("InstanceState");
     oprot.WriteStructBegin(struc);
     TField field = new TField();
     if (Id != null && __isset.Id) {
       field.Name = "Id";
       field.Type = TType.String;
       field.ID = 1;
       oprot.WriteFieldBegin(field);
       oprot.WriteString(Id);
       oprot.WriteFieldEnd();
     }
     if (__isset.Revision) {
       field.Name = "Revision";
       field.Type = TType.I64;
       field.ID = 2;
       oprot.WriteFieldBegin(field);
       oprot.WriteI64(Revision);
       oprot.WriteFieldEnd();
     }
     if (__isset.LastResult) {
       field.Name = "LastResult";
       field.Type = TType.Double;
       field.ID = 3;
       oprot.WriteFieldBegin(field);
       oprot.WriteDouble(LastResult);
       oprot.WriteFieldEnd();
     }
     oprot.WriteFieldStop();
     oprot.WriteStructEnd();
   }
   finally
   {
     oprot.DecrementRecursionDepth();
   }
 }
Ejemplo n.º 6
0
 public void Write(TProtocol oprot) {
   oprot.IncrementRecursionDepth();
   try
   {
     TStruct struc = new TStruct("NtfTestString");
     oprot.WriteStructBegin(struc);
     TField field = new TField();
     if (Message != null && __isset.message) {
       field.Name = "message";
       field.Type = TType.String;
       field.ID = 1;
       oprot.WriteFieldBegin(field);
       oprot.WriteString(Message);
       oprot.WriteFieldEnd();
     }
     oprot.WriteFieldStop();
     oprot.WriteStructEnd();
   }
   finally
   {
     oprot.DecrementRecursionDepth();
   }
 }
Ejemplo n.º 7
0
 public void Write(TProtocol oprot) {
   oprot.IncrementRecursionDepth();
   try
   {
     TStruct struc = new TStruct("ReqSangcharim");
     oprot.WriteStructBegin(struc);
     TField field = new TField();
     if (__isset.sangcharim) {
       field.Name = "sangcharim";
       field.Type = TType.I32;
       field.ID = 1;
       oprot.WriteFieldBegin(field);
       oprot.WriteI32((int)Sangcharim);
       oprot.WriteFieldEnd();
     }
     oprot.WriteFieldStop();
     oprot.WriteStructEnd();
   }
   finally
   {
     oprot.DecrementRecursionDepth();
   }
 }
Ejemplo n.º 8
0
 public void Write(TProtocol oprot) {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("Customer");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (__isset.customerId) {
             field.Name = "customerId";
             field.Type = TType.I32;
             field.ID = 1;
             oprot.WriteFieldBegin(field);
             oprot.WriteI32(CustomerId);
             oprot.WriteFieldEnd();
         }
         if (Name != null && __isset.name) {
             field.Name = "name";
             field.Type = TType.String;
             field.ID = 2;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(Name);
             oprot.WriteFieldEnd();
         }
         if (AddressInfo != null && __isset.addressInfo) {
             field.Name = "addressInfo";
             field.Type = TType.Struct;
             field.ID = 3;
             oprot.WriteFieldBegin(field);
             AddressInfo.Write(oprot);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }
Ejemplo n.º 9
0
 public void Write(TProtocol oprot) {
   oprot.IncrementRecursionDepth();
   try
   {
     TStruct struc = new TStruct("GetConfiguration_args");
     oprot.WriteStructBegin(struc);
     oprot.WriteFieldStop();
     oprot.WriteStructEnd();
   }
   finally
   {
     oprot.DecrementRecursionDepth();
   }
 }
Ejemplo n.º 10
0
 public void Write(TProtocol oprot) {
   oprot.IncrementRecursionDepth();
   try
   {
     TStruct struc = new TStruct("ReqLogin");
     oprot.WriteStructBegin(struc);
     TField field = new TField();
     if (UserName != null && __isset.userName) {
       field.Name = "userName";
       field.Type = TType.String;
       field.ID = 1;
       oprot.WriteFieldBegin(field);
       oprot.WriteString(UserName);
       oprot.WriteFieldEnd();
     }
     if (LoginPlatform != null && __isset.loginPlatform) {
       field.Name = "loginPlatform";
       field.Type = TType.String;
       field.ID = 2;
       oprot.WriteFieldBegin(field);
       oprot.WriteString(LoginPlatform);
       oprot.WriteFieldEnd();
     }
     if (DeviceDesc != null && __isset.deviceDesc) {
       field.Name = "deviceDesc";
       field.Type = TType.String;
       field.ID = 3;
       oprot.WriteFieldBegin(field);
       oprot.WriteString(DeviceDesc);
       oprot.WriteFieldEnd();
     }
     oprot.WriteFieldStop();
     oprot.WriteStructEnd();
   }
   finally
   {
     oprot.DecrementRecursionDepth();
   }
 }
Ejemplo n.º 11
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<Customer>();
                             TList _list0 = iprot.ReadListBegin();
                             for( int _i1 = 0; _i1 < _list0.Count; ++_i1)
                             {
                                 Customer _elem2;
                                 _elem2 = new Customer();
                                 _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();
     }
 }
Ejemplo n.º 12
0
 public void Write(TProtocol oprot) {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("Add_args");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (Customer != null && __isset.customer) {
             field.Name = "customer";
             field.Type = TType.Struct;
             field.ID = 1;
             oprot.WriteFieldBegin(field);
             Customer.Write(oprot);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }
Ejemplo n.º 13
0
            public void Write(TProtocol oprot) {
                oprot.IncrementRecursionDepth();
                try
                {
                    TStruct struc = new TStruct("Add_result");
                    oprot.WriteStructBegin(struc);
                    TField field = new TField();

                    if (this.__isset.success) {
                        field.Name = "Success";
                        field.Type = TType.I32;
                        field.ID = 0;
                        oprot.WriteFieldBegin(field);
                        oprot.WriteI32(Success);
                        oprot.WriteFieldEnd();
                    }
                    oprot.WriteFieldStop();
                    oprot.WriteStructEnd();
                }
                finally
                {
                    oprot.DecrementRecursionDepth();
                }
            }
Ejemplo n.º 14
0
            public void Write(TProtocol oprot) {
                oprot.IncrementRecursionDepth();
                try
                {
                    TStruct struc = new TStruct("GetMap_result");
                    oprot.WriteStructBegin(struc);
                    TField field = new TField();

                    if (this.__isset.success) {
                        if (Success != null) {
                            field.Name = "Success";
                            field.Type = TType.Map;
                            field.ID = 0;
                            oprot.WriteFieldBegin(field);
                            {
                                oprot.WriteMapBegin(new TMap(TType.I32, TType.Struct, Success.Count));
                                foreach (int _iter8 in Success.Keys)
                                {
                                    oprot.WriteI32(_iter8);
                                    Success[_iter8].Write(oprot);
                                }
                                oprot.WriteMapEnd();
                            }
                            oprot.WriteFieldEnd();
                        }
                    }
                    oprot.WriteFieldStop();
                    oprot.WriteStructEnd();
                }
                finally
                {
                    oprot.DecrementRecursionDepth();
                }
            }
Ejemplo n.º 15
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.Map) {
                         {
                             Success = new Dictionary<int, Customer>();
                             TMap _map4 = iprot.ReadMapBegin();
                             for( int _i5 = 0; _i5 < _map4.Count; ++_i5)
                             {
                                 int _key6;
                                 Customer _val7;
                                 _key6 = iprot.ReadI32();
                                 _val7 = new Customer();
                                 _val7.Read(iprot);
                                 Success[_key6] = _val7;
                             }
                             iprot.ReadMapEnd();
                         }
                     } else { 
                         TProtocolUtil.Skip(iprot, field.Type);
                     }
                     break;
                 default: 
                     TProtocolUtil.Skip(iprot, field.Type);
                     break;
             }
             iprot.ReadFieldEnd();
         }
         iprot.ReadStructEnd();
     }
     finally
     {
         iprot.DecrementRecursionDepth();
     }
 }
Ejemplo n.º 16
0
            public void Write(TProtocol oprot) {
                oprot.IncrementRecursionDepth();
                try
                {
                    TStruct struc = new TStruct("GetList_result");
                    oprot.WriteStructBegin(struc);
                    TField field = new TField();

                    if (this.__isset.success) {
                        if (Success != null) {
                            field.Name = "Success";
                            field.Type = TType.List;
                            field.ID = 0;
                            oprot.WriteFieldBegin(field);
                            {
                                oprot.WriteListBegin(new TList(TType.Struct, Success.Count));
                                foreach (Customer _iter3 in Success)
                                {
                                    _iter3.Write(oprot);
                                }
                                oprot.WriteListEnd();
                            }
                            oprot.WriteFieldEnd();
                        }
                    }
                    oprot.WriteFieldStop();
                    oprot.WriteStructEnd();
                }
                finally
                {
                    oprot.DecrementRecursionDepth();
                }
            }
Ejemplo n.º 17
0
 public void Write(TProtocol oprot) {
   oprot.IncrementRecursionDepth();
   try
   {
     TStruct struc = new TStruct("BaseMsg");
     oprot.WriteStructBegin(struc);
     TField field = new TField();
     field.Name = "msgType";
     field.Type = TType.I32;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32((int)MsgType);
     oprot.WriteFieldEnd();
     if (__isset.boolVal) {
       field.Name = "boolVal";
       field.Type = TType.Bool;
       field.ID = 2;
       oprot.WriteFieldBegin(field);
       oprot.WriteBool(BoolVal);
       oprot.WriteFieldEnd();
     }
     if (__isset.byteVal) {
       field.Name = "byteVal";
       field.Type = TType.Byte;
       field.ID = 3;
       oprot.WriteFieldBegin(field);
       oprot.WriteByte(ByteVal);
       oprot.WriteFieldEnd();
     }
     if (__isset.intVal) {
       field.Name = "intVal";
       field.Type = TType.I32;
       field.ID = 4;
       oprot.WriteFieldBegin(field);
       oprot.WriteI32(IntVal);
       oprot.WriteFieldEnd();
     }
     if (__isset.doubleVal) {
       field.Name = "doubleVal";
       field.Type = TType.Double;
       field.ID = 5;
       oprot.WriteFieldBegin(field);
       oprot.WriteDouble(DoubleVal);
       oprot.WriteFieldEnd();
     }
     if (StrVal != null && __isset.strVal) {
       field.Name = "strVal";
       field.Type = TType.String;
       field.ID = 6;
       oprot.WriteFieldBegin(field);
       oprot.WriteString(StrVal);
       oprot.WriteFieldEnd();
     }
     if (ByteArrVal != null && __isset.byteArrVal) {
       field.Name = "byteArrVal";
       field.Type = TType.String;
       field.ID = 7;
       oprot.WriteFieldBegin(field);
       oprot.WriteBinary(ByteArrVal);
       oprot.WriteFieldEnd();
     }
     if (MapVal != null && __isset.mapVal) {
       field.Name = "mapVal";
       field.Type = TType.Map;
       field.ID = 8;
       oprot.WriteFieldBegin(field);
       {
         oprot.WriteMapBegin(new TMap(TType.Struct, TType.Struct, MapVal.Count));
         foreach (BaseMsg _iter10 in MapVal.Keys)
         {
           _iter10.Write(oprot);
           MapVal[_iter10].Write(oprot);
         }
         oprot.WriteMapEnd();
       }
       oprot.WriteFieldEnd();
     }
     if (ListVal != null && __isset.listVal) {
       field.Name = "listVal";
       field.Type = TType.List;
       field.ID = 9;
       oprot.WriteFieldBegin(field);
       {
         oprot.WriteListBegin(new TList(TType.Struct, ListVal.Count));
         foreach (BaseMsg _iter11 in ListVal)
         {
           _iter11.Write(oprot);
         }
         oprot.WriteListEnd();
       }
       oprot.WriteFieldEnd();
     }
     if (SetVal != null && __isset.setVal) {
       field.Name = "setVal";
       field.Type = TType.Set;
       field.ID = 10;
       oprot.WriteFieldBegin(field);
       {
         oprot.WriteSetBegin(new TSet(TType.Struct, SetVal.Count));
         foreach (BaseMsg _iter12 in SetVal)
         {
           _iter12.Write(oprot);
         }
         oprot.WriteSetEnd();
       }
       oprot.WriteFieldEnd();
     }
     oprot.WriteFieldStop();
     oprot.WriteStructEnd();
   }
   finally
   {
     oprot.DecrementRecursionDepth();
   }
 }
Ejemplo n.º 18
0
 public void Write(TProtocol oprot) {
   oprot.IncrementRecursionDepth();
   try
   {
     TStruct struc = new TStruct("Workpack");
     oprot.WriteStructBegin(struc);
     TField field = new TField();
     if (Instance != null && __isset.Instance) {
       field.Name = "Instance";
       field.Type = TType.Struct;
       field.ID = 1;
       oprot.WriteFieldBegin(field);
       Instance.Write(oprot);
       oprot.WriteFieldEnd();
     }
     if (__isset.OpCode) {
       field.Name = "OpCode";
       field.Type = TType.I32;
       field.ID = 2;
       oprot.WriteFieldBegin(field);
       oprot.WriteI32((int)OpCode);
       oprot.WriteFieldEnd();
     }
     if (Input != null && __isset.Input) {
       field.Name = "Input";
       field.Type = TType.Struct;
       field.ID = 3;
       oprot.WriteFieldBegin(field);
       Input.Write(oprot);
       oprot.WriteFieldEnd();
     }
     oprot.WriteFieldStop();
     oprot.WriteStructEnd();
   }
   finally
   {
     oprot.DecrementRecursionDepth();
   }
 }
        public static void Skip(TProtocol prot, TType type)
        {
            prot.IncrementRecursionDepth();
            try
            {
                switch (type)
                {
                    case TType.Bool:
                        prot.ReadBool();
                        break;
                    case TType.Byte:
                        prot.ReadByte();
                        break;
                    case TType.I16:
                        prot.ReadI16();
                        break;
                    case TType.I32:
                        prot.ReadI32();
                        break;
                    case TType.I64:
                        prot.ReadI64();
                        break;
                    case TType.Double:
                        prot.ReadDouble();
                        break;
                    case TType.String:
                        // Don't try to decode the string, just skip it.
                        prot.ReadBinary();
                        break;
                    case TType.Struct:
                        prot.ReadStructBegin();
                        while (true)
                        {
                            TField field = prot.ReadFieldBegin();
                            if (field.Type == TType.Stop)
                            {
                                break;
                            }
                            Skip(prot, field.Type);
                            prot.ReadFieldEnd();
                        }
                        prot.ReadStructEnd();
                        break;
                    case TType.Map:
                        TMap map = prot.ReadMapBegin();
                        for (int i = 0; i < map.Count; i++)
                        {
                            Skip(prot, map.KeyType);
                            Skip(prot, map.ValueType);
                        }
                        prot.ReadMapEnd();
                        break;
                    case TType.Set:
                        TSet set = prot.ReadSetBegin();
                        for (int i = 0; i < set.Count; i++)
                        {
                            Skip(prot, set.ElementType);
                        }
                        prot.ReadSetEnd();
                        break;
                    case TType.List:
                        TList list = prot.ReadListBegin();
                        for (int i = 0; i < list.Count; i++)
                        {
                            Skip(prot, list.ElementType);
                        }
                        prot.ReadListEnd();
                        break;
                }

            }
            finally
            {
                prot.DecrementRecursionDepth();
            }
        }
Ejemplo n.º 20
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) {
             Instance = new InstanceDescriptor();
             Instance.Read(iprot);
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 2:
           if (field.Type == TType.I32) {
             OpCode = (Operation)iprot.ReadI32();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 3:
           if (field.Type == TType.Struct) {
             Input = new InputData();
             Input.Read(iprot);
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         default: 
           TProtocolUtil.Skip(iprot, field.Type);
           break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
   }
   finally
   {
     iprot.DecrementRecursionDepth();
   }
 }
Ejemplo n.º 21
0
 public void Write(TProtocol oprot) {
   oprot.IncrementRecursionDepth();
   try
   {
     TStruct struc = new TStruct("SetConfiguration_args");
     oprot.WriteStructBegin(struc);
     TField field = new TField();
     if (NewConfig != null && __isset.newConfig) {
       field.Name = "newConfig";
       field.Type = TType.Struct;
       field.ID = 1;
       oprot.WriteFieldBegin(field);
       NewConfig.Write(oprot);
       oprot.WriteFieldEnd();
     }
     oprot.WriteFieldStop();
     oprot.WriteStructEnd();
   }
   finally
   {
     oprot.DecrementRecursionDepth();
   }
 }
Ejemplo n.º 22
0
 public void Write(TProtocol oprot) {
   oprot.IncrementRecursionDepth();
   try
   {
     TStruct struc = new TStruct("NtfMatch");
     oprot.WriteStructBegin(struc);
     TField field = new TField();
     if (__isset.localId) {
       field.Name = "localId";
       field.Type = TType.I32;
       field.ID = 1;
       oprot.WriteFieldBegin(field);
       oprot.WriteI32(LocalId);
       oprot.WriteFieldEnd();
     }
     oprot.WriteFieldStop();
     oprot.WriteStructEnd();
   }
   finally
   {
     oprot.DecrementRecursionDepth();
   }
 }
Ejemplo n.º 23
0
      public void Write(TProtocol oprot) {
        oprot.IncrementRecursionDepth();
        try
        {
          TStruct struc = new TStruct("GetConfiguration_result");
          oprot.WriteStructBegin(struc);
          TField field = new TField();

          if (this.__isset.success) {
            if (Success != null) {
              field.Name = "Success";
              field.Type = TType.Struct;
              field.ID = 0;
              oprot.WriteFieldBegin(field);
              Success.Write(oprot);
              oprot.WriteFieldEnd();
            }
          }
          oprot.WriteFieldStop();
          oprot.WriteStructEnd();
        }
        finally
        {
          oprot.DecrementRecursionDepth();
        }
      }
Ejemplo n.º 24
0
 public void Write(TProtocol oprot) {
   oprot.IncrementRecursionDepth();
   try
   {
     TStruct struc = new TStruct("AnsLogin");
     oprot.WriteStructBegin(struc);
     TField field = new TField();
     if (__isset.usn) {
       field.Name = "usn";
       field.Type = TType.I64;
       field.ID = 1;
       oprot.WriteFieldBegin(field);
       oprot.WriteI64(Usn);
       oprot.WriteFieldEnd();
     }
     if (NickName != null && __isset.nickName) {
       field.Name = "nickName";
       field.Type = TType.String;
       field.ID = 2;
       oprot.WriteFieldBegin(field);
       oprot.WriteString(NickName);
       oprot.WriteFieldEnd();
     }
     if (Comment != null && __isset.comment) {
       field.Name = "comment";
       field.Type = TType.String;
       field.ID = 3;
       oprot.WriteFieldBegin(field);
       oprot.WriteString(Comment);
       oprot.WriteFieldEnd();
     }
     if (__isset.level) {
       field.Name = "level";
       field.Type = TType.I32;
       field.ID = 4;
       oprot.WriteFieldBegin(field);
       oprot.WriteI32(Level);
       oprot.WriteFieldEnd();
     }
     if (__isset.victoryCount) {
       field.Name = "victoryCount";
       field.Type = TType.I32;
       field.ID = 5;
       oprot.WriteFieldBegin(field);
       oprot.WriteI32(VictoryCount);
       oprot.WriteFieldEnd();
     }
     if (__isset.defeatCount) {
       field.Name = "defeatCount";
       field.Type = TType.I32;
       field.ID = 6;
       oprot.WriteFieldBegin(field);
       oprot.WriteI32(DefeatCount);
       oprot.WriteFieldEnd();
     }
     oprot.WriteFieldStop();
     oprot.WriteStructEnd();
   }
   finally
   {
     oprot.DecrementRecursionDepth();
   }
 }
Ejemplo n.º 25
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.I32) {
                         CustomerId = iprot.ReadI32();
                     } else { 
                         TProtocolUtil.Skip(iprot, field.Type);
                     }
                     break;
                 case 2:
                     if (field.Type == TType.String) {
                         Name = iprot.ReadString();
                     } else { 
                         TProtocolUtil.Skip(iprot, field.Type);
                     }
                     break;
                 case 3:
                     if (field.Type == TType.Struct) {
                         AddressInfo = new Address();
                         AddressInfo.Read(iprot);
                     } else { 
                         TProtocolUtil.Skip(iprot, field.Type);
                     }
                     break;
                 default: 
                     TProtocolUtil.Skip(iprot, field.Type);
                     break;
             }
             iprot.ReadFieldEnd();
         }
         iprot.ReadStructEnd();
     }
     finally
     {
         iprot.DecrementRecursionDepth();
     }
 }
Ejemplo n.º 26
0
 public void Write(TProtocol oprot) {
   oprot.IncrementRecursionDepth();
   try
   {
     TStruct struc = new TStruct("ServiceConfig");
     oprot.WriteStructBegin(struc);
     TField field = new TField();
     field.Name = "pageId";
     field.Type = TType.String;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(PageId);
     oprot.WriteFieldEnd();
     field.Name = "pollingPeriod";
     field.Type = TType.I32;
     field.ID = 2;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32(PollingPeriod);
     oprot.WriteFieldEnd();
     field.Name = "rainmeterExe";
     field.Type = TType.String;
     field.ID = 3;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(RainmeterExe);
     oprot.WriteFieldEnd();
     oprot.WriteFieldStop();
     oprot.WriteStructEnd();
   }
   finally
   {
     oprot.DecrementRecursionDepth();
   }
 }
Ejemplo n.º 27
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) {
             Usn = iprot.ReadI64();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 2:
           if (field.Type == TType.String) {
             NickName = iprot.ReadString();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 3:
           if (field.Type == TType.String) {
             Comment = iprot.ReadString();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 4:
           if (field.Type == TType.I32) {
             Level = iprot.ReadI32();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 5:
           if (field.Type == TType.I32) {
             VictoryCount = iprot.ReadI32();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 6:
           if (field.Type == TType.I32) {
             DefeatCount = iprot.ReadI32();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         default: 
           TProtocolUtil.Skip(iprot, field.Type);
           break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
   }
   finally
   {
     iprot.DecrementRecursionDepth();
   }
 }
Ejemplo n.º 28
0
 public void Read (TProtocol iprot)
 {
   iprot.IncrementRecursionDepth();
   try
   {
     bool isset_pageId = false;
     bool isset_pollingPeriod = false;
     bool isset_rainmeterExe = false;
     TField field;
     iprot.ReadStructBegin();
     while (true)
     {
       field = iprot.ReadFieldBegin();
       if (field.Type == TType.Stop) { 
         break;
       }
       switch (field.ID)
       {
         case 1:
           if (field.Type == TType.String) {
             PageId = iprot.ReadString();
             isset_pageId = true;
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 2:
           if (field.Type == TType.I32) {
             PollingPeriod = iprot.ReadI32();
             isset_pollingPeriod = true;
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 3:
           if (field.Type == TType.String) {
             RainmeterExe = iprot.ReadString();
             isset_rainmeterExe = true;
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         default: 
           TProtocolUtil.Skip(iprot, field.Type);
           break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
     if (!isset_pageId)
       throw new TProtocolException(TProtocolException.INVALID_DATA);
     if (!isset_pollingPeriod)
       throw new TProtocolException(TProtocolException.INVALID_DATA);
     if (!isset_rainmeterExe)
       throw new TProtocolException(TProtocolException.INVALID_DATA);
   }
   finally
   {
     iprot.DecrementRecursionDepth();
   }
 }
Ejemplo n.º 29
0
 public void Write(TProtocol oprot) {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("Address");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (City != null && __isset.city) {
             field.Name = "city";
             field.Type = TType.String;
             field.ID = 1;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(City);
             oprot.WriteFieldEnd();
         }
         if (Street != null && __isset.street) {
             field.Name = "street";
             field.Type = TType.String;
             field.ID = 2;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(Street);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }
Ejemplo n.º 30
0
 public void Write(TProtocol oprot) {
   oprot.IncrementRecursionDepth();
   try
   {
     TStruct struc = new TStruct("InstanceDescriptor");
     oprot.WriteStructBegin(struc);
     TField field = new TField();
     if (Id != null && __isset.Id) {
       field.Name = "Id";
       field.Type = TType.String;
       field.ID = 1;
       oprot.WriteFieldBegin(field);
       oprot.WriteString(Id);
       oprot.WriteFieldEnd();
     }
     oprot.WriteFieldStop();
     oprot.WriteStructEnd();
   }
   finally
   {
     oprot.DecrementRecursionDepth();
   }
 }