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


C# TProtocol.ReadBool方法代码示例

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


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

示例1: Read

 public void Read (TProtocol iprot)
 {
   bool isset_success = 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.Bool) {
           Success = iprot.ReadBool();
           isset_success = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.List) {
           {
             Current_values = new List<Column>();
             TList _list24 = iprot.ReadListBegin();
             for( int _i25 = 0; _i25 < _list24.Count; ++_i25)
             {
               Column _elem26 = new Column();
               _elem26 = new Column();
               _elem26.Read(iprot);
               Current_values.Add(_elem26);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_success)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:49,代码来源:CASResult.cs

示例2: Read

 public void Read (TProtocol iprot)
 {
   bool isset_start = false;
   bool isset_finish = false;
   bool isset_reversed = false;
   bool isset_count = 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) {
           Start = iprot.ReadBinary();
           isset_start = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.String) {
           Finish = iprot.ReadBinary();
           isset_finish = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.Bool) {
           Reversed = iprot.ReadBool();
           isset_reversed = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.I32) {
           Count = iprot.ReadI32();
           isset_count = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_start)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_finish)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_reversed)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_count)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:64,代码来源:SliceRange.cs

示例3: 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

示例4: Read


//.........这里部分代码省略.........
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 15:
         if (field.Type == TType.String) {
           Default_validation_class = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 16:
         if (field.Type == TType.I32) {
           Id = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 17:
         if (field.Type == TType.I32) {
           Min_compaction_threshold = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 18:
         if (field.Type == TType.I32) {
           Max_compaction_threshold = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         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)
             {
开发者ID:nathannis,项目名称:fluentcassandra,代码行数:67,代码来源:CfDef.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) {
           Start = iprot.ReadBinary();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.String) {
           Finish = iprot.ReadBinary();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.Bool) {
           Reversed = iprot.ReadBool();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.I32) {
           Count = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:nathannis,项目名称:fluentcassandra,代码行数:48,代码来源:SliceRange.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

 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.I32) {
           Acknowledged_by = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Bool) {
           Acknowledged_by_batchlog = iprot.ReadBool();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.Bool) {
           Paxos_in_progress = iprot.ReadBool();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:41,代码来源:TimedOutException.cs

示例8: 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

示例9: Read


//.........这里部分代码省略.........
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 15:
         if (field.Type == TType.String) {
           Default_validation_class = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 16:
         if (field.Type == TType.I32) {
           Id = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 17:
         if (field.Type == TType.I32) {
           Min_compaction_threshold = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 18:
         if (field.Type == TType.I32) {
           Max_compaction_threshold = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         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)
             {
开发者ID:achinn,项目名称:fluentcassandra,代码行数:67,代码来源:CfDef.cs


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