当前位置: 首页>>代码示例>>C#>>正文


C# TProtocol.ReadMapBegin方法代码示例

本文整理汇总了C#中Thrift.Protocol.TProtocol.ReadMapBegin方法的典型用法代码示例。如果您正苦于以下问题:C# TProtocol.ReadMapBegin方法的具体用法?C# TProtocol.ReadMapBegin怎么用?C# TProtocol.ReadMapBegin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Thrift.Protocol.TProtocol的用法示例。


在下文中一共展示了TProtocol.ReadMapBegin方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Read

 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.Map) {
           {
             MessageMap = new Dictionary<string, Dictionary<int, string>>();
             TMap _map30 = iprot.ReadMapBegin();
             for( int _i31 = 0; _i31 < _map30.Count; ++_i31)
             {
               string _key32;
               Dictionary<int, string> _val33;
               _key32 = iprot.ReadString();
               {
                 _val33 = new Dictionary<int, string>();
                 TMap _map34 = iprot.ReadMapBegin();
                 for( int _i35 = 0; _i35 < _map34.Count; ++_i35)
                 {
                   int _key36;
                   string _val37;
                   _key36 = iprot.ReadI32();
                   _val37 = iprot.ReadString();
                   _val33[_key36] = _val37;
                 }
                 iprot.ReadMapEnd();
               }
               MessageMap[_key32] = _val33;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:Blizzardx,项目名称:ClientFrameWork,代码行数:51,代码来源:MessageConfigTable.cs

示例2: Read

 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.Map) {
           {
             ItemLvlTmpls = new Dictionary<int, ItemLevelTemplate>();
             TMap _map8 = iprot.ReadMapBegin();
             for( int _i9 = 0; _i9 < _map8.Count; ++_i9)
             {
               int _key10;
               ItemLevelTemplate _val11;
               _key10 = iprot.ReadI32();
               _val11 = new ItemLevelTemplate();
               _val11.Read(iprot);
               ItemLvlTmpls[_key10] = _val11;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Map) {
           {
             ItemEvoluteTmpls = new Dictionary<int, ItemEvoluteTemplate>();
             TMap _map12 = iprot.ReadMapBegin();
             for( int _i13 = 0; _i13 < _map12.Count; ++_i13)
             {
               int _key14;
               ItemEvoluteTemplate _val15;
               _key14 = iprot.ReadI32();
               _val15 = new ItemEvoluteTemplate();
               _val15.Read(iprot);
               ItemEvoluteTmpls[_key14] = _val15;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:wuxin0602,项目名称:Nothing,代码行数:60,代码来源:ItemConfig.cs

示例3: Read

 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.Map) {
           {
             HeroBattleSkillTmpls = new Dictionary<int, HeroBattleSkillTemplate>();
             TMap _map28 = iprot.ReadMapBegin();
             for( int _i29 = 0; _i29 < _map28.Count; ++_i29)
             {
               int _key30;
               HeroBattleSkillTemplate _val31;
               _key30 = iprot.ReadI32();
               _val31 = new HeroBattleSkillTemplate();
               _val31.Read(iprot);
               HeroBattleSkillTmpls[_key30] = _val31;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Map) {
           {
             MonsterBattleSkillTmpls = new Dictionary<int, MonsterBattleSkillTemplate>();
             TMap _map32 = iprot.ReadMapBegin();
             for( int _i33 = 0; _i33 < _map32.Count; ++_i33)
             {
               int _key34;
               MonsterBattleSkillTemplate _val35;
               _key34 = iprot.ReadI32();
               _val35 = new MonsterBattleSkillTemplate();
               _val35.Read(iprot);
               MonsterBattleSkillTmpls[_key34] = _val35;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:wuxin0602,项目名称:Nothing,代码行数:60,代码来源:Skill.cs

示例4: Read

 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.Map) {
           {
             QuestTmpls = new Dictionary<int, QuestTemplate>();
             TMap _map0 = iprot.ReadMapBegin();
             for( int _i1 = 0; _i1 < _map0.Count; ++_i1)
             {
               int _key2;
               QuestTemplate _val3;
               _key2 = iprot.ReadI32();
               _val3 = new QuestTemplate();
               _val3.Read(iprot);
               QuestTmpls[_key2] = _val3;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Map) {
           {
             QuestChapterTmpls = new Dictionary<int, QuestChapterTemplate>();
             TMap _map4 = iprot.ReadMapBegin();
             for( int _i5 = 0; _i5 < _map4.Count; ++_i5)
             {
               int _key6;
               QuestChapterTemplate _val7;
               _key6 = iprot.ReadI32();
               _val7 = new QuestChapterTemplate();
               _val7.Read(iprot);
               QuestChapterTmpls[_key6] = _val7;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:wuxin0602,项目名称:Nothing,代码行数:60,代码来源:Quest.cs

示例5: Read

 public void Read(TProtocol iprot)
 {
     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)
                 {
                     this.Row = iprot.ReadBinary();
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 2:
                 if (field.Type == TType.Map)
                 {
                     {
                         this.Columns = new Dictionary<byte[], TCell>();
                         TMap _map4 = iprot.ReadMapBegin();
                         for (int _i5 = 0; _i5 < _map4.Count; ++_i5)
                         {
                             byte[] _key6;
                             TCell _val7;
                             _key6 = iprot.ReadBinary();
                             _val7 = new TCell();
                             _val7.Read(iprot);
                             this.Columns[_key6] = _val7;
                         }
                         iprot.ReadMapEnd();
                     }
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             default:
                 TProtocolUtil.Skip(iprot, field.Type);
                 break;
         }
         iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }
开发者ID:nordbergm,项目名称:HBaseNet,代码行数:54,代码来源:TRowResult.cs

示例6: Read

 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 10:
         if (field.Type == TType.Map) {
           {
             StateConflictMap = new Dictionary<int, List<StateConflictConfigElement>>();
             TMap _map36 = iprot.ReadMapBegin();
             for( int _i37 = 0; _i37 < _map36.Count; ++_i37)
             {
               int _key38;
               List<StateConflictConfigElement> _val39;
               _key38 = iprot.ReadI32();
               {
                 _val39 = new List<StateConflictConfigElement>();
                 TList _list40 = iprot.ReadListBegin();
                 for( int _i41 = 0; _i41 < _list40.Count; ++_i41)
                 {
                   StateConflictConfigElement _elem42 = new StateConflictConfigElement();
                   _elem42 = new StateConflictConfigElement();
                   _elem42.Read(iprot);
                   _val39.Add(_elem42);
                 }
                 iprot.ReadListEnd();
               }
               StateConflictMap[_key38] = _val39;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:Blizzardx,项目名称:ClientFrameWork,代码行数:50,代码来源:StateConflictConfig.cs

示例7: Read

 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.Map) {
           {
             LimitFuncSceneConfigMap = new Dictionary<int, List<Config.LimitFuncSceneConfig>>();
             TMap _map128 = iprot.ReadMapBegin();
             for( int _i129 = 0; _i129 < _map128.Count; ++_i129)
             {
               int _key130;
               List<Config.LimitFuncSceneConfig> _val131;
               _key130 = iprot.ReadI32();
               {
                 _val131 = new List<Config.LimitFuncSceneConfig>();
                 TList _list132 = iprot.ReadListBegin();
                 for( int _i133 = 0; _i133 < _list132.Count; ++_i133)
                 {
                   Config.LimitFuncSceneConfig _elem134 = new Config.LimitFuncSceneConfig();
                   _elem134 = new Config.LimitFuncSceneConfig();
                   _elem134.Read(iprot);
                   _val131.Add(_elem134);
                 }
                 iprot.ReadListEnd();
               }
               LimitFuncSceneConfigMap[_key130] = _val131;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:Blizzardx,项目名称:ClientFrameWork,代码行数:50,代码来源:LimitFuncSceneConfigTable.cs

示例8: Read

 public void Read (TProtocol iprot)
 {
   bool isset_serialized_parts = 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.Map) {
           {
             Serialized_parts = new Dictionary<string, ThriftSerializedObject>();
             TMap _map218 = iprot.ReadMapBegin();
             for( int _i219 = 0; _i219 < _map218.Count; ++_i219)
             {
               string _key220;
               ThriftSerializedObject _val221;
               _key220 = iprot.ReadString();
               _val221 = new ThriftSerializedObject();
               _val221.Read(iprot);
               Serialized_parts[_key220] = _val221;
             }
             iprot.ReadMapEnd();
           }
           isset_serialized_parts = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_serialized_parts)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
开发者ID:bcardi,项目名称:storm-net-adapter,代码行数:44,代码来源:LocalStateData.cs

示例9: Read

 public void Read (TProtocol iprot)
 {
   bool isset_assignments = 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.Map) {
           {
             Assignments = new Dictionary<int, LocalAssignment>();
             TMap _map232 = iprot.ReadMapBegin();
             for( int _i233 = 0; _i233 < _map232.Count; ++_i233)
             {
               int _key234;
               LocalAssignment _val235;
               _key234 = iprot.ReadI32();
               _val235 = new LocalAssignment();
               _val235.Read(iprot);
               Assignments[_key234] = _val235;
             }
             iprot.ReadMapEnd();
           }
           isset_assignments = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_assignments)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
开发者ID:bcardi,项目名称:storm-net-adapter,代码行数:44,代码来源:LSSupervisorAssignments.cs

示例10: Read

 public void Read (TProtocol iprot)
 {
   bool isset_creds = 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.Map) {
           {
             Creds = new Dictionary<string, string>();
             TMap _map163 = iprot.ReadMapBegin();
             for( int _i164 = 0; _i164 < _map163.Count; ++_i164)
             {
               string _key165;
               string _val166;
               _key165 = iprot.ReadString();
               _val166 = iprot.ReadString();
               Creds[_key165] = _val166;
             }
             iprot.ReadMapEnd();
           }
           isset_creds = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_creds)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
开发者ID:bcardi,项目名称:storm-net-adapter,代码行数:43,代码来源:Credentials.cs

示例11: Read

 public void Read (TProtocol iprot)
 {
   bool isset_approved_workers = 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.Map) {
           {
             Approved_workers = new Dictionary<string, int>();
             TMap _map227 = iprot.ReadMapBegin();
             for( int _i228 = 0; _i228 < _map227.Count; ++_i228)
             {
               string _key229;
               int _val230;
               _key229 = iprot.ReadString();
               _val230 = iprot.ReadI32();
               Approved_workers[_key229] = _val230;
             }
             iprot.ReadMapEnd();
           }
           isset_approved_workers = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_approved_workers)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
开发者ID:bcardi,项目名称:storm-net-adapter,代码行数:43,代码来源:LSApprovedWorkers.cs

示例12: Read

 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 10:
         if (field.Type == TType.Map) {
           {
             DifficultyConfig = new Dictionary<string, DifficultyConfig>();
             TMap _map10 = iprot.ReadMapBegin();
             for( int _i11 = 0; _i11 < _map10.Count; ++_i11)
             {
               string _key12;
               DifficultyConfig _val13;
               _key12 = iprot.ReadString();
               _val13 = new DifficultyConfig();
               _val13.Read(iprot);
               DifficultyConfig[_key12] = _val13;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:Blizzardx,项目名称:ClientFrameWork,代码行数:40,代码来源:DifficultyControlData.cs

示例13: Read

 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.Map) {
           {
             StageConfigMap = new Dictionary<int, Config.StageConfig>();
             TMap _map50 = iprot.ReadMapBegin();
             for( int _i51 = 0; _i51 < _map50.Count; ++_i51)
             {
               int _key52;
               Config.StageConfig _val53;
               _key52 = iprot.ReadI32();
               _val53 = new Config.StageConfig();
               _val53.Read(iprot);
               StageConfigMap[_key52] = _val53;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:Blizzardx,项目名称:ClientFrameWork,代码行数:40,代码来源:StageConfigTable.cs

示例14: Read

 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.Map) {
           {
             SkillConfigMap = new Dictionary<int, Config.SkillConfig>();
             TMap _map69 = iprot.ReadMapBegin();
             for( int _i70 = 0; _i70 < _map69.Count; ++_i70)
             {
               int _key71;
               Config.SkillConfig _val72;
               _key71 = iprot.ReadI32();
               _val72 = new Config.SkillConfig();
               _val72.Read(iprot);
               SkillConfigMap[_key71] = _val72;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:Blizzardx,项目名称:ClientFrameWork,代码行数:40,代码来源:SkillConfigTable.cs

示例15: Read

 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.Map) {
           {
             MusicConfigMap = new Dictionary<int, Config.MusicGameNoteKeyConfig>();
             TMap _map123 = iprot.ReadMapBegin();
             for( int _i124 = 0; _i124 < _map123.Count; ++_i124)
             {
               int _key125;
               Config.MusicGameNoteKeyConfig _val126;
               _key125 = iprot.ReadI32();
               _val126 = new Config.MusicGameNoteKeyConfig();
               _val126.Read(iprot);
               MusicConfigMap[_key125] = _val126;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:Blizzardx,项目名称:ClientFrameWork,代码行数:40,代码来源:MusicGameSettingTable.cs


注:本文中的Thrift.Protocol.TProtocol.ReadMapBegin方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。