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


C# TProtocol.ReadStructBegin方法代码示例

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


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

示例1: Read

 public void Read (TProtocol iprot)
 {
   bool isset_why = 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) {
           Why = iprot.ReadString();
           isset_why = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_why)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:31,代码来源:AuthenticationException.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 3:
         if (field.Type == TType.String) {
           Column_family = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.String) {
           Super_column = iprot.ReadBinary();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:kenangell,项目名称:fluentcassandra,代码行数:34,代码来源:ColumnParent.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.String) {
           Key = iprot.ReadBinary();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         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,代码行数:34,代码来源:KeyCount.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.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;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:kenangell,项目名称:fluentcassandra,代码行数:34,代码来源:TimedOutException.cs

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

示例6: Read

 public void Read (TProtocol iprot)
 {
   bool isset_name = false;
   bool isset_columns = 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.List) {
           {
             Columns = new List<CounterColumn>();
             TList _list4 = iprot.ReadListBegin();
             for( int _i5 = 0; _i5 < _list4.Count; ++_i5)
             {
               CounterColumn _elem6 = new CounterColumn();
               _elem6 = new CounterColumn();
               _elem6.Read(iprot);
               Columns.Add(_elem6);
             }
             iprot.ReadListEnd();
           }
           isset_columns = 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_columns)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:53,代码来源:CounterSuperColumn.cs

示例7: Read

 public void Read (TProtocol iprot)
 {
   bool isset_column_name = false;
   bool isset_op = false;
   bool isset_value = 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) {
           Column_name = iprot.ReadBinary();
           isset_column_name = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.I32) {
           Op = (IndexOperator)iprot.ReadI32();
           isset_op = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.String) {
           Value = iprot.ReadBinary();
           isset_value = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_column_name)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_op)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_value)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:53,代码来源:IndexExpression.cs

示例8: Read

 public void Read (TProtocol iprot)
 {
   bool isset_start_token = false;
   bool isset_end_token = false;
   bool isset_row_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_token = iprot.ReadString();
           isset_start_token = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.String) {
           End_token = iprot.ReadString();
           isset_end_token = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.I64) {
           Row_count = iprot.ReadI64();
           isset_row_count = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_start_token)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_end_token)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_row_count)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:53,代码来源:CfSplit.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.List) {
           {
             Expressions = new List<IndexExpression>();
             TList _list12 = iprot.ReadListBegin();
             for( int _i13 = 0; _i13 < _list12.Count; ++_i13)
             {
               IndexExpression _elem14 = new IndexExpression();
               _elem14 = new IndexExpression();
               _elem14.Read(iprot);
               Expressions.Add(_elem14);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.String) {
           Start_key = iprot.ReadBinary();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         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:kenangell,项目名称:fluentcassandra,代码行数:52,代码来源:IndexClause.cs

示例10: Read

		public static TApplicationException Read(TProtocol iprot)
		{
			TField field;

			string message = null;
			ExceptionType type = ExceptionType.Unknown;

			iprot.ReadStructBegin();
			while (true)
			{
				field = iprot.ReadFieldBegin();
				if (field.Type == TType.Stop)
				{
					break;
				}

				switch (field.ID)
				{
					case 1:
						if (field.Type == TType.String)
						{
							message = iprot.ReadString();
						}
						else
						{
							TProtocolUtil.Skip(iprot, field.Type);
						}
						break;
					case 2:
						if (field.Type == TType.I32)
						{
							type = (ExceptionType)iprot.ReadI32();
						}
						else
						{
							TProtocolUtil.Skip(iprot, field.Type);
						}
						break;
					default:
						TProtocolUtil.Skip(iprot, field.Type);
						break;
				}

				iprot.ReadFieldEnd();
			}

			iprot.ReadStructEnd();

			return new TApplicationException(type, message);
		}
开发者ID:kenangell,项目名称:fluentcassandra,代码行数:50,代码来源:TApplicationException.cs

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

示例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 1:
         if (field.Type == TType.List) {
           {
             Column_names = new List<byte[]>();
             TList _list8 = iprot.ReadListBegin();
             for( int _i9 = 0; _i9 < _list8.Count; ++_i9)
             {
               byte[] _elem10 = null;
               _elem10 = iprot.ReadBinary();
               Column_names.Add(_elem10);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Struct) {
           Slice_range = new SliceRange();
           Slice_range.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:45,代码来源:SlicePredicate.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.String) {
           Key = iprot.ReadBinary();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.List) {
           {
             Columns = new List<ColumnOrSuperColumn>();
             TList _list20 = iprot.ReadListBegin();
             for( int _i21 = 0; _i21 < _list20.Count; ++_i21)
             {
               ColumnOrSuperColumn _elem22 = new ColumnOrSuperColumn();
               _elem22 = new ColumnOrSuperColumn();
               _elem22.Read(iprot);
               Columns.Add(_elem22);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:nathannis,项目名称:fluentcassandra,代码行数:45,代码来源:KeySlice.cs

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

示例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.I64) {
           Timestamp = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.String) {
           Super_column = iprot.ReadBinary();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.Struct) {
           Predicate = new SlicePredicate();
           Predicate.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
开发者ID:kenangell,项目名称:fluentcassandra,代码行数:42,代码来源:Deletion.cs


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