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


C# TProtocol.ReadMapBegin方法代码示例

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


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

示例1: Read

 public void Read (TProtocol iprot)
 {
   bool isset_name = false;
   bool isset_options = 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) {
           Name = iprot.ReadString();
           isset_name = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Map) {
           {
             Options = new Dictionary<string, string>();
             TMap _map50 = iprot.ReadMapBegin();
             for( int _i51 = 0; _i51 < _map50.Count; ++_i51)
             {
               string _key52;
               string _val53;
               _key52 = iprot.ReadString();
               _val53 = iprot.ReadString();
               Options[_key52] = _val53;
             }
             iprot.ReadMapEnd();
           }
           isset_options = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_name)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_options)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:54,代码来源:TriggerDef.cs

示例2: Read

 public void Read (TProtocol iprot)
 {
   bool isset_credentials = 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) {
           {
             Credentials = new Dictionary<string, string>();
             TMap _map40 = iprot.ReadMapBegin();
             for( int _i41 = 0; _i41 < _map40.Count; ++_i41)
             {
               string _key42;
               string _val43;
               _key42 = iprot.ReadString();
               _val43 = iprot.ReadString();
               Credentials[_key42] = _val43;
             }
             iprot.ReadMapEnd();
           }
           isset_credentials = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_credentials)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:43,代码来源:AuthenticationRequest.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) {
           {
             Credentials = new Dictionary<string, string>();
             TMap _map36 = iprot.ReadMapBegin();
             for( int _i37 = 0; _i37 < _map36.Count; ++_i37)
             {
               string _key38;
               string _val39;
               _key38 = iprot.ReadString();
               _val39 = iprot.ReadString();
               Credentials[_key38] = _val39;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:kenangell,项目名称:fluentcassandra,代码行数:39,代码来源:AuthenticationRequest.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) {
           {
             Mutation_map = new Dictionary<byte[], Dictionary<string, List<Mutation>>>();
             TMap _map147 = iprot.ReadMapBegin();
             for( int _i148 = 0; _i148 < _map147.Count; ++_i148)
             {
               byte[] _key149;
               Dictionary<string, List<Mutation>> _val150;
               _key149 = iprot.ReadBinary();
               {
                 _val150 = new Dictionary<string, List<Mutation>>();
                 TMap _map151 = iprot.ReadMapBegin();
                 for( int _i152 = 0; _i152 < _map151.Count; ++_i152)
                 {
                   string _key153;
                   List<Mutation> _val154;
                   _key153 = iprot.ReadString();
                   {
                     _val154 = new List<Mutation>();
                     TList _list155 = iprot.ReadListBegin();
                     for( int _i156 = 0; _i156 < _list155.Count; ++_i156)
                     {
                       Mutation _elem157 = new Mutation();
                       _elem157 = new Mutation();
                       _elem157.Read(iprot);
                       _val154.Add(_elem157);
                     }
                     iprot.ReadListEnd();
                   }
                   _val150[_key153] = _val154;
                 }
                 iprot.ReadMapEnd();
               }
               Mutation_map[_key149] = _val150;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.I32) {
           Consistency_level = (ConsistencyLevel)iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:nathannis,项目名称:fluentcassandra,代码行数:69,代码来源:Cassandra.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 0:
         if (field.Type == TType.Map) {
           {
             Success = new Dictionary<byte[], List<ColumnOrSuperColumn>>();
             TMap _map116 = iprot.ReadMapBegin();
             for( int _i117 = 0; _i117 < _map116.Count; ++_i117)
             {
               byte[] _key118;
               List<ColumnOrSuperColumn> _val119;
               _key118 = iprot.ReadBinary();
               {
                 _val119 = new List<ColumnOrSuperColumn>();
                 TList _list120 = iprot.ReadListBegin();
                 for( int _i121 = 0; _i121 < _list120.Count; ++_i121)
                 {
                   ColumnOrSuperColumn _elem122 = new ColumnOrSuperColumn();
                   _elem122 = new ColumnOrSuperColumn();
                   _elem122.Read(iprot);
                   _val119.Add(_elem122);
                 }
                 iprot.ReadListEnd();
               }
               Success[_key118] = _val119;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 1:
         if (field.Type == TType.Struct) {
           Ire = new InvalidRequestException();
           Ire.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Struct) {
           Ue = new UnavailableException();
           Ue.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.Struct) {
           Te = new TimedOutException();
           Te.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:74,代码来源:Cassandra.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 1:
         if (field.Type == TType.String) {
           Name = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.String) {
           Strategy_class = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.Map) {
           {
             Strategy_options = new Dictionary<string, string>();
             TMap _map60 = iprot.ReadMapBegin();
             for( int _i61 = 0; _i61 < _map60.Count; ++_i61)
             {
               string _key62;
               string _val63;
               _key62 = iprot.ReadString();
               _val63 = iprot.ReadString();
               Strategy_options[_key62] = _val63;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.I32) {
           Replication_factor = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 5:
         if (field.Type == TType.List) {
           {
             Cf_defs = new List<CfDef>();
             TList _list64 = iprot.ReadListBegin();
             for( int _i65 = 0; _i65 < _list64.Count; ++_i65)
             {
               CfDef _elem66 = new CfDef();
               _elem66 = new CfDef();
               _elem66.Read(iprot);
               Cf_defs.Add(_elem66);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 6:
         if (field.Type == TType.Bool) {
           Durable_writes = iprot.ReadBool();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:nathannis,项目名称:fluentcassandra,代码行数:85,代码来源:KsDef.cs

示例7: Read


//.........这里部分代码省略.........
         break;
       case 24:
         if (field.Type == TType.Bool) {
           Replicate_on_write = iprot.ReadBool();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 26:
         if (field.Type == TType.String) {
           Key_validation_class = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 28:
         if (field.Type == TType.String) {
           Key_alias = iprot.ReadBinary();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 29:
         if (field.Type == TType.String) {
           Compaction_strategy = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 30:
         if (field.Type == TType.Map) {
           {
             Compaction_strategy_options = new Dictionary<string, string>();
             TMap _map49 = iprot.ReadMapBegin();
             for( int _i50 = 0; _i50 < _map49.Count; ++_i50)
             {
               string _key51;
               string _val52;
               _key51 = iprot.ReadString();
               _val52 = iprot.ReadString();
               Compaction_strategy_options[_key51] = _val52;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 32:
         if (field.Type == TType.Map) {
           {
             Compression_options = new Dictionary<string, string>();
             TMap _map53 = iprot.ReadMapBegin();
             for( int _i54 = 0; _i54 < _map53.Count; ++_i54)
             {
               string _key55;
               string _val56;
               _key55 = iprot.ReadString();
               _val56 = iprot.ReadString();
               Compression_options[_key55] = _val56;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
开发者ID:nathannis,项目名称:fluentcassandra,代码行数:67,代码来源:CfDef.cs

示例8: Read

 public void Read (TProtocol iprot)
 {
   bool isset_name_types = false;
   bool isset_value_types = false;
   bool isset_default_name_type = false;
   bool isset_default_value_type = 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) {
           {
             Name_types = new Dictionary<byte[], string>();
             TMap _map86 = iprot.ReadMapBegin();
             for( int _i87 = 0; _i87 < _map86.Count; ++_i87)
             {
               byte[] _key88;
               string _val89;
               _key88 = iprot.ReadBinary();
               _val89 = iprot.ReadString();
               Name_types[_key88] = _val89;
             }
             iprot.ReadMapEnd();
           }
           isset_name_types = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Map) {
           {
             Value_types = new Dictionary<byte[], string>();
             TMap _map90 = iprot.ReadMapBegin();
             for( int _i91 = 0; _i91 < _map90.Count; ++_i91)
             {
               byte[] _key92;
               string _val93;
               _key92 = iprot.ReadBinary();
               _val93 = iprot.ReadString();
               Value_types[_key92] = _val93;
             }
             iprot.ReadMapEnd();
           }
           isset_value_types = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.String) {
           Default_name_type = iprot.ReadString();
           isset_default_name_type = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.String) {
           Default_value_type = iprot.ReadString();
           isset_default_value_type = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_name_types)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_value_types)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_default_name_type)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_default_value_type)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:88,代码来源:CqlMetadata.cs

示例9: 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) {
           {
             Name_types = new Dictionary<byte[], string>();
             TMap _map73 = iprot.ReadMapBegin();
             for( int _i74 = 0; _i74 < _map73.Count; ++_i74)
             {
               byte[] _key75;
               string _val76;
               _key75 = iprot.ReadBinary();
               _val76 = iprot.ReadString();
               Name_types[_key75] = _val76;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Map) {
           {
             Value_types = new Dictionary<byte[], string>();
             TMap _map77 = iprot.ReadMapBegin();
             for( int _i78 = 0; _i78 < _map77.Count; ++_i78)
             {
               byte[] _key79;
               string _val80;
               _key79 = iprot.ReadBinary();
               _val80 = iprot.ReadString();
               Value_types[_key79] = _val80;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.String) {
           Default_name_type = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.String) {
           Default_value_type = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:kenangell,项目名称:fluentcassandra,代码行数:72,代码来源:CqlMetadata.cs

示例10: 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) {
           Name = iprot.ReadBinary();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.String) {
           Validation_class = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.I32) {
           Index_type = (IndexType)iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.String) {
           Index_name = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 5:
         if (field.Type == TType.Map) {
           {
             Index_options = new Dictionary<string, string>();
             TMap _map41 = iprot.ReadMapBegin();
             for( int _i42 = 0; _i42 < _map41.Count; ++_i42)
             {
               string _key43;
               string _val44;
               _key43 = iprot.ReadString();
               _val44 = iprot.ReadString();
               Index_options[_key43] = _val44;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:kenangell,项目名称:fluentcassandra,代码行数:67,代码来源:ColumnDef.cs

示例11: Read

 public void Read (TProtocol iprot)
 {
   bool isset_name = false;
   bool isset_validation_class = 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) {
           Name = iprot.ReadBinary();
           isset_name = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.String) {
           Validation_class = iprot.ReadString();
           isset_validation_class = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.I32) {
           Index_type = (IndexType)iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.String) {
           Index_name = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 5:
         if (field.Type == TType.Map) {
           {
             Index_options = new Dictionary<string, string>();
             TMap _map45 = iprot.ReadMapBegin();
             for( int _i46 = 0; _i46 < _map45.Count; ++_i46)
             {
               string _key47;
               string _val48;
               _key47 = iprot.ReadString();
               _val48 = iprot.ReadString();
               Index_options[_key47] = _val48;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_name)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_validation_class)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:75,代码来源:ColumnDef.cs

示例12: Read

 public void Read (TProtocol iprot)
 {
   bool isset_name = false;
   bool isset_strategy_class = false;
   bool isset_cf_defs = 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) {
           Name = iprot.ReadString();
           isset_name = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.String) {
           Strategy_class = iprot.ReadString();
           isset_strategy_class = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.Map) {
           {
             Strategy_options = new Dictionary<string, string>();
             TMap _map73 = iprot.ReadMapBegin();
             for( int _i74 = 0; _i74 < _map73.Count; ++_i74)
             {
               string _key75;
               string _val76;
               _key75 = iprot.ReadString();
               _val76 = iprot.ReadString();
               Strategy_options[_key75] = _val76;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.I32) {
           Replication_factor = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 5:
         if (field.Type == TType.List) {
           {
             Cf_defs = new List<CfDef>();
             TList _list77 = iprot.ReadListBegin();
             for( int _i78 = 0; _i78 < _list77.Count; ++_i78)
             {
               CfDef _elem79 = new CfDef();
               _elem79 = new CfDef();
               _elem79.Read(iprot);
               Cf_defs.Add(_elem79);
             }
             iprot.ReadListEnd();
           }
           isset_cf_defs = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 6:
         if (field.Type == TType.Bool) {
           Durable_writes = iprot.ReadBool();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_name)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_strategy_class)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_cf_defs)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:97,代码来源:KsDef.cs

示例13: Skip

		public static void Skip(TProtocol prot, TType type)
		{
			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;
			}
		}
开发者ID:nathannis,项目名称:fluentcassandra,代码行数:67,代码来源:TProtocolUtil.cs

示例14: Read


//.........这里部分代码省略.........
         break;
       case 24:
         if (field.Type == TType.Bool) {
           Replicate_on_write = iprot.ReadBool();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 26:
         if (field.Type == TType.String) {
           Key_validation_class = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 28:
         if (field.Type == TType.String) {
           Key_alias = iprot.ReadBinary();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 29:
         if (field.Type == TType.String) {
           Compaction_strategy = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 30:
         if (field.Type == TType.Map) {
           {
             Compaction_strategy_options = new Dictionary<string, string>();
             TMap _map58 = iprot.ReadMapBegin();
             for( int _i59 = 0; _i59 < _map58.Count; ++_i59)
             {
               string _key60;
               string _val61;
               _key60 = iprot.ReadString();
               _val61 = iprot.ReadString();
               Compaction_strategy_options[_key60] = _val61;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 32:
         if (field.Type == TType.Map) {
           {
             Compression_options = new Dictionary<string, string>();
             TMap _map62 = iprot.ReadMapBegin();
             for( int _i63 = 0; _i63 < _map62.Count; ++_i63)
             {
               string _key64;
               string _val65;
               _key64 = iprot.ReadString();
               _val65 = iprot.ReadString();
               Compression_options[_key64] = _val65;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:67,代码来源:CfDef.cs


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