本文整理汇总了C#中FluentCassandra.Thrift.Protocol.TProtocol.ReadString方法的典型用法代码示例。如果您正苦于以下问题:C# TProtocol.ReadString方法的具体用法?C# TProtocol.ReadString怎么用?C# TProtocol.ReadString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FluentCassandra.Thrift.Protocol.TProtocol
的用法示例。
在下文中一共展示了TProtocol.ReadString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例2: 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);
}
示例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) {
Why = iprot.ReadString();
} 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)
{
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);
}
示例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 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();
}
示例6: 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);
}
示例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) {
{
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();
}
示例8: 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);
}
示例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 0:
if (field.Type == TType.String) {
Success = iprot.ReadString();
} 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) {
Sde = new SchemaDisagreementException();
Sde.Read(iprot);
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
default:
TProtocolUtil.Skip(iprot, field.Type);
break;
}
iprot.ReadFieldEnd();
}
iprot.ReadStructEnd();
}
示例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) {
Start_key = iprot.ReadBinary();
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 2:
if (field.Type == TType.String) {
End_key = iprot.ReadBinary();
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 3:
if (field.Type == TType.String) {
Start_token = iprot.ReadString();
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 4:
if (field.Type == TType.String) {
End_token = iprot.ReadString();
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 6:
if (field.Type == TType.List) {
{
Row_filter = new List<IndexExpression>();
TList _list16 = iprot.ReadListBegin();
for( int _i17 = 0; _i17 < _list16.Count; ++_i17)
{
IndexExpression _elem18 = new IndexExpression();
_elem18 = new IndexExpression();
_elem18.Read(iprot);
Row_filter.Add(_elem18);
}
iprot.ReadListEnd();
}
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 5:
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();
}
示例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 0:
if (field.Type == TType.Map) {
{
Success = new Dictionary<string, List<string>>();
TMap _map161 = iprot.ReadMapBegin();
for( int _i162 = 0; _i162 < _map161.Count; ++_i162)
{
string _key163;
List<string> _val164;
_key163 = iprot.ReadString();
{
_val164 = new List<string>();
TList _list165 = iprot.ReadListBegin();
for( int _i166 = 0; _i166 < _list165.Count; ++_i166)
{
string _elem167 = null;
_elem167 = iprot.ReadString();
_val164.Add(_elem167);
}
iprot.ReadListEnd();
}
Success[_key163] = _val164;
}
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;
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.String) {
Start_token = iprot.ReadString();
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 2:
if (field.Type == TType.String) {
End_token = iprot.ReadString();
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 3:
if (field.Type == TType.List) {
{
Endpoints = new List<string>();
TList _list24 = iprot.ReadListBegin();
for( int _i25 = 0; _i25 < _list24.Count; ++_i25)
{
string _elem26 = null;
_elem26 = iprot.ReadString();
Endpoints.Add(_elem26);
}
iprot.ReadListEnd();
}
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 4:
if (field.Type == TType.List) {
{
Rpc_endpoints = new List<string>();
TList _list27 = iprot.ReadListBegin();
for( int _i28 = 0; _i28 < _list27.Count; ++_i28)
{
string _elem29 = null;
_elem29 = iprot.ReadString();
Rpc_endpoints.Add(_elem29);
}
iprot.ReadListEnd();
}
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 5:
if (field.Type == TType.List) {
{
Endpoint_details = new List<EndpointDetails>();
TList _list30 = iprot.ReadListBegin();
for( int _i31 = 0; _i31 < _list30.Count; ++_i31)
{
EndpointDetails _elem32 = new EndpointDetails();
_elem32 = new EndpointDetails();
_elem32.Read(iprot);
Endpoint_details.Add(_elem32);
}
iprot.ReadListEnd();
}
} 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_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);
}
示例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) {
{
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();
}
示例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.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();
}