當前位置: 首頁>>代碼示例>>C#>>正文


C# TProtocol.IncrementRecursionDepth方法代碼示例

本文整理匯總了C#中Thrift.Protocol.TProtocol.IncrementRecursionDepth方法的典型用法代碼示例。如果您正苦於以下問題:C# TProtocol.IncrementRecursionDepth方法的具體用法?C# TProtocol.IncrementRecursionDepth怎麽用?C# TProtocol.IncrementRecursionDepth使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Thrift.Protocol.TProtocol的用法示例。


在下文中一共展示了TProtocol.IncrementRecursionDepth方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Read

 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) {
             Sangcharim = (Sangcharim)iprot.ReadI32();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         default: 
           TProtocolUtil.Skip(iprot, field.Type);
           break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
   }
   finally
   {
     iprot.DecrementRecursionDepth();
   }
 }
開發者ID:serenitii,項目名稱:jeisimple,代碼行數:35,代碼來源:ReqSangcharim.cs

示例2: Read

 public void Read (TProtocol iprot)
 {
   iprot.IncrementRecursionDepth();
   try
   {
     bool isset_MessageName = 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) {
             MessageName = iprot.ReadString();
             isset_MessageName = true;
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 2:
           if (field.Type == TType.Map) {
             {
               MessageBody = new Dictionary<string, BaseMsg>();
               TMap _map13 = iprot.ReadMapBegin();
               for( int _i14 = 0; _i14 < _map13.Count; ++_i14)
               {
                 string _key15;
                 BaseMsg _val16;
                 _key15 = iprot.ReadString();
                 _val16 = new BaseMsg();
                 _val16.Read(iprot);
                 MessageBody[_key15] = _val16;
               }
               iprot.ReadMapEnd();
             }
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         default: 
           TProtocolUtil.Skip(iprot, field.Type);
           break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
     if (!isset_MessageName)
       throw new TProtocolException(TProtocolException.INVALID_DATA);
   }
   finally
   {
     iprot.DecrementRecursionDepth();
   }
 }
開發者ID:wsycarlos,項目名稱:ARIA,代碼行數:59,代碼來源:NetMsg.cs

示例3: Write

 public void Write(TProtocol oprot) {
   oprot.IncrementRecursionDepth();
   try
   {
     TStruct struc = new TStruct("ReqChannelInfo");
     oprot.WriteStructBegin(struc);
     oprot.WriteFieldStop();
     oprot.WriteStructEnd();
   }
   finally
   {
     oprot.DecrementRecursionDepth();
   }
 }
開發者ID:serenitii,項目名稱:jeisimple,代碼行數:14,代碼來源:ReqChannelInfo.cs

示例4: Read

 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.Bool) {
             Success = iprot.ReadBool();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 2:
           if (field.Type == TType.String) {
             Message = iprot.ReadString();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 3:
           if (field.Type == TType.String) {
             Result = iprot.ReadBinary();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         default: 
           TProtocolUtil.Skip(iprot, field.Type);
           break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
   }
   finally
   {
     iprot.DecrementRecursionDepth();
   }
 }
開發者ID:hazelcast,項目名稱:hazelcast-remote-controller,代碼行數:49,代碼來源:Response.cs

示例5: Read

 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) {
             UserName = iprot.ReadString();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 2:
           if (field.Type == TType.String) {
             LoginPlatform = iprot.ReadString();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 3:
           if (field.Type == TType.String) {
             DeviceDesc = iprot.ReadString();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         default: 
           TProtocolUtil.Skip(iprot, field.Type);
           break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
   }
   finally
   {
     iprot.DecrementRecursionDepth();
   }
 }
開發者ID:serenitii,項目名稱:jeisimple,代碼行數:49,代碼來源:ReqLogin.cs

示例6: Read

 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;
         case 2:
           if (field.Type == TType.I64) {
             Revision = iprot.ReadI64();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 3:
           if (field.Type == TType.Double) {
             LastResult = iprot.ReadDouble();
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         default: 
           TProtocolUtil.Skip(iprot, field.Type);
           break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
   }
   finally
   {
     iprot.DecrementRecursionDepth();
   }
 }
開發者ID:Jens-G,項目名稱:Redis-Samples,代碼行數:49,代碼來源:InstanceState.cs

示例7: Write

 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();
   }
 }
開發者ID:serenitii,項目名稱:jeisimple,代碼行數:39,代碼來源:ReqLogin.cs

示例8: Skip

        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();
            }
        }
開發者ID:ConfusedReality,項目名稱:pkg_serialization_thrift,代碼行數:76,代碼來源:TProtocolUtil.cs

示例9: Write

      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();
        }
      }
開發者ID:dhickie,項目名稱:JustGivingService,代碼行數:26,代碼來源:ConfigService.cs

示例10: Write

 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();
   }
 }
開發者ID:serenitii,項目名稱:jeisimple,代碼行數:23,代碼來源:NtfMatch.cs

示例11: Read

 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();
   }
 }
開發者ID:Jens-G,項目名稱:Redis-Samples,代碼行數:51,代碼來源:Workpack.cs

示例12: Write

 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();
   }
 }
開發者ID:Jens-G,項目名稱:Redis-Samples,代碼行數:39,代碼來源:Workpack.cs

示例13: Write

 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();
   }
 }
開發者ID:Jens-G,項目名稱:Redis-Samples,代碼行數:23,代碼來源:InstanceDescriptor.cs

示例14: Read

 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.Struct) {
             Success = new ServiceConfig();
             Success.Read(iprot);
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         default: 
           TProtocolUtil.Skip(iprot, field.Type);
           break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
   }
   finally
   {
     iprot.DecrementRecursionDepth();
   }
 }
開發者ID:dhickie,項目名稱:JustGivingService,代碼行數:36,代碼來源:ConfigService.cs

示例15: Write

 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();
   }
 }
開發者ID:Jens-G,項目名稱:Redis-Samples,代碼行數:39,代碼來源:InstanceState.cs


注:本文中的Thrift.Protocol.TProtocol.IncrementRecursionDepth方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。