本文整理汇总了C#中FluentCassandra.Thrift.Protocol.TProtocol.ReadFieldBegin方法的典型用法代码示例。如果您正苦于以下问题:C# TProtocol.ReadFieldBegin方法的具体用法?C# TProtocol.ReadFieldBegin怎么用?C# TProtocol.ReadFieldBegin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FluentCassandra.Thrift.Protocol.TProtocol
的用法示例。
在下文中一共展示了TProtocol.ReadFieldBegin方法的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);
}
示例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();
}
示例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();
}
示例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();
}
示例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);
}
示例6: 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);
}
示例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);
}
示例8: 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);
}
示例9: 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);
}
示例10: 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);
}
示例11: 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();
}
示例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();
}
示例13: 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);
}
示例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.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();
}
示例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)
{
default:
TProtocolUtil.Skip(iprot, field.Type);
break;
}
iprot.ReadFieldEnd();
}
iprot.ReadStructEnd();
}