本文整理汇总了C#中Thrift.Protocol.TProtocol.ReadListBegin方法的典型用法代码示例。如果您正苦于以下问题:C# TProtocol.ReadListBegin方法的具体用法?C# TProtocol.ReadListBegin怎么用?C# TProtocol.ReadListBegin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Thrift.Protocol.TProtocol
的用法示例。
在下文中一共展示了TProtocol.ReadListBegin方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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) {
{
BattleFriend = new List<KXSGCodec.FriendInfo>();
TList _list21 = iprot.ReadListBegin();
for( int _i22 = 0; _i22 < _list21.Count; ++_i22)
{
KXSGCodec.FriendInfo _elem23 = new KXSGCodec.FriendInfo();
_elem23 = new KXSGCodec.FriendInfo();
_elem23.Read(iprot);
BattleFriend.Add(_elem23);
}
iprot.ReadListEnd();
}
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 2:
if (field.Type == TType.List) {
{
BattleGuest = new List<KXSGCodec.FriendInfo>();
TList _list24 = iprot.ReadListBegin();
for( int _i25 = 0; _i25 < _list24.Count; ++_i25)
{
KXSGCodec.FriendInfo _elem26 = new KXSGCodec.FriendInfo();
_elem26 = new KXSGCodec.FriendInfo();
_elem26.Read(iprot);
BattleGuest.Add(_elem26);
}
iprot.ReadListEnd();
}
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
default:
TProtocolUtil.Skip(iprot, field.Type);
break;
}
iprot.ReadFieldEnd();
}
iprot.ReadStructEnd();
}
示例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 10:
if (field.Type == TType.List) {
{
TimerList = new List<Config.ArithmeticTimer>();
TList _list95 = iprot.ReadListBegin();
for( int _i96 = 0; _i96 < _list95.Count; ++_i96)
{
Config.ArithmeticTimer _elem97 = new Config.ArithmeticTimer();
_elem97 = new Config.ArithmeticTimer();
_elem97.Read(iprot);
TimerList.Add(_elem97);
}
iprot.ReadListEnd();
}
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 20:
if (field.Type == TType.List) {
{
QuestionList = new List<Config.ArithmeticQuestion>();
TList _list98 = iprot.ReadListBegin();
for( int _i99 = 0; _i99 < _list98.Count; ++_i99)
{
Config.ArithmeticQuestion _elem100 = new Config.ArithmeticQuestion();
_elem100 = new Config.ArithmeticQuestion();
_elem100.Read(iprot);
QuestionList.Add(_elem100);
}
iprot.ReadListEnd();
}
} 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.List) {
{
Users = new List<Contact>();
TList _list42 = iprot.ReadListBegin();
for( int _i43 = 0; _i43 < _list42.Count; ++_i43)
{
Contact _elem44 = new Contact();
_elem44 = new Contact();
_elem44.Read(iprot);
Users.Add(_elem44);
}
iprot.ReadListEnd();
}
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 2:
if (field.Type == TType.List) {
{
Buddies = new List<Contact>();
TList _list45 = iprot.ReadListBegin();
for( int _i46 = 0; _i46 < _list45.Count; ++_i46)
{
Contact _elem47 = new Contact();
_elem47 = new Contact();
_elem47.Read(iprot);
Buddies.Add(_elem47);
}
iprot.ReadListEnd();
}
} 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_Tokenizer = false;
bool isset_Filters = 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.Struct) {
Tokenizer = new Tokenizer();
Tokenizer.Read(iprot);
isset_Tokenizer = true;
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 2:
if (field.Type == TType.List) {
{
Filters = new List<TokenFilter>();
TList _list10 = iprot.ReadListBegin();
for( int _i11 = 0; _i11 < _list10.Count; ++_i11)
{
TokenFilter _elem12 = new TokenFilter();
_elem12 = new TokenFilter();
_elem12.Read(iprot);
Filters.Add(_elem12);
}
iprot.ReadListEnd();
}
isset_Filters = true;
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
default:
TProtocolUtil.Skip(iprot, field.Type);
break;
}
iprot.ReadFieldEnd();
}
iprot.ReadStructEnd();
if (!isset_Tokenizer)
throw new TProtocolException(TProtocolException.INVALID_DATA);
if (!isset_Filters)
throw new TProtocolException(TProtocolException.INVALID_DATA);
}
示例5: Read
public void Read (TProtocol iprot)
{
bool isset_full_class_name = false;
bool isset_args_list = 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) {
Full_class_name = iprot.ReadString();
isset_full_class_name = true;
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 2:
if (field.Type == TType.List) {
{
Args_list = new List<JavaObjectArg>();
TList _list0 = iprot.ReadListBegin();
for( int _i1 = 0; _i1 < _list0.Count; ++_i1)
{
JavaObjectArg _elem2;
_elem2 = new JavaObjectArg();
_elem2.Read(iprot);
Args_list.Add(_elem2);
}
iprot.ReadListEnd();
}
isset_args_list = true;
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
default:
TProtocolUtil.Skip(iprot, field.Type);
break;
}
iprot.ReadFieldEnd();
}
iprot.ReadStructEnd();
if (!isset_full_class_name)
throw new TProtocolException(TProtocolException.INVALID_DATA);
if (!isset_args_list)
throw new TProtocolException(TProtocolException.INVALID_DATA);
}
示例6: Read
public void Read (TProtocol iprot)
{
bool isset_topology_id = false;
bool isset_executors = 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) {
Topology_id = iprot.ReadString();
isset_topology_id = true;
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 2:
if (field.Type == TType.List) {
{
Executors = new List<ExecutorInfo>();
TList _list223 = iprot.ReadListBegin();
for( int _i224 = 0; _i224 < _list223.Count; ++_i224)
{
ExecutorInfo _elem225;
_elem225 = new ExecutorInfo();
_elem225.Read(iprot);
Executors.Add(_elem225);
}
iprot.ReadListEnd();
}
isset_executors = true;
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
default:
TProtocolUtil.Skip(iprot, field.Type);
break;
}
iprot.ReadFieldEnd();
}
iprot.ReadStructEnd();
if (!isset_topology_id)
throw new TProtocolException(TProtocolException.INVALID_DATA);
if (!isset_executors)
throw new TProtocolException(TProtocolException.INVALID_DATA);
}
示例7: Read
public void Read (TProtocol iprot)
{
bool isset_output_fields = false;
bool isset_direct = 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.List) {
{
Output_fields = new List<string>();
TList _list8 = iprot.ReadListBegin();
for( int _i9 = 0; _i9 < _list8.Count; ++_i9)
{
string _elem10;
_elem10 = iprot.ReadString();
Output_fields.Add(_elem10);
}
iprot.ReadListEnd();
}
isset_output_fields = true;
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 2:
if (field.Type == TType.Bool) {
Direct = iprot.ReadBool();
isset_direct = true;
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
default:
TProtocolUtil.Skip(iprot, field.Type);
break;
}
iprot.ReadFieldEnd();
}
iprot.ReadStructEnd();
if (!isset_output_fields)
throw new TProtocolException(TProtocolException.INVALID_DATA);
if (!isset_direct)
throw new TProtocolException(TProtocolException.INVALID_DATA);
}
示例8: 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)
{
this.Row = iprot.ReadBinary();
}
else
{
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 2:
if (field.Type == TType.List)
{
{
this.Mutations = new List<Mutation>();
TList _list0 = iprot.ReadListBegin();
for (int _i1 = 0; _i1 < _list0.Count; ++_i1)
{
var _elem2 = new Mutation();
_elem2 = new Mutation();
_elem2.Read(iprot);
this.Mutations.Add(_elem2);
}
iprot.ReadListEnd();
}
}
else
{
TProtocolUtil.Skip(iprot, field.Type);
}
break;
default:
TProtocolUtil.Skip(iprot, field.Type);
break;
}
iprot.ReadFieldEnd();
}
iprot.ReadStructEnd();
}
示例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) {
{
LimitFuncSceneConfigMap = new Dictionary<int, List<Config.LimitFuncSceneConfig>>();
TMap _map128 = iprot.ReadMapBegin();
for( int _i129 = 0; _i129 < _map128.Count; ++_i129)
{
int _key130;
List<Config.LimitFuncSceneConfig> _val131;
_key130 = iprot.ReadI32();
{
_val131 = new List<Config.LimitFuncSceneConfig>();
TList _list132 = iprot.ReadListBegin();
for( int _i133 = 0; _i133 < _list132.Count; ++_i133)
{
Config.LimitFuncSceneConfig _elem134 = new Config.LimitFuncSceneConfig();
_elem134 = new Config.LimitFuncSceneConfig();
_elem134.Read(iprot);
_val131.Add(_elem134);
}
iprot.ReadListEnd();
}
LimitFuncSceneConfigMap[_key130] = _val131;
}
iprot.ReadMapEnd();
}
} 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 10:
if (field.Type == TType.Map) {
{
StateConflictMap = new Dictionary<int, List<StateConflictConfigElement>>();
TMap _map36 = iprot.ReadMapBegin();
for( int _i37 = 0; _i37 < _map36.Count; ++_i37)
{
int _key38;
List<StateConflictConfigElement> _val39;
_key38 = iprot.ReadI32();
{
_val39 = new List<StateConflictConfigElement>();
TList _list40 = iprot.ReadListBegin();
for( int _i41 = 0; _i41 < _list40.Count; ++_i41)
{
StateConflictConfigElement _elem42 = new StateConflictConfigElement();
_elem42 = new StateConflictConfigElement();
_elem42.Read(iprot);
_val39.Add(_elem42);
}
iprot.ReadListEnd();
}
StateConflictMap[_key38] = _val39;
}
iprot.ReadMapEnd();
}
} 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;
TStruct struc = iprot.ReadStructBegin();
while (true)
{
field = iprot.ReadFieldBegin();
if (field.Type == TType.Stop) {
break;
}
switch (field.ID)
{
case 1:
if (field.Type == TType.String) {
this.name = iprot.ReadString();
this.__isset.name = true;
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 2:
if (field.Type == TType.List) {
{
this.columns = new List<column_t>();
TList _list9 = iprot.ReadListBegin();
for( int _i10 = 0; _i10 < _list9.Count; ++_i10)
{
column_t _elem11 = new column_t();
_elem11 = new column_t();
_elem11.Read(iprot);
this.columns.Add(_elem11);
}
iprot.ReadListEnd();
}
this.__isset.columns = true;
} 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) {
{
MessageBoxWrapUpList = new List<TMessageBoxWrapUp>();
TList _list77 = iprot.ReadListBegin();
for( int _i78 = 0; _i78 < _list77.Count; ++_i78)
{
TMessageBoxWrapUp _elem79 = new TMessageBoxWrapUp();
_elem79 = new TMessageBoxWrapUp();
_elem79.Read(iprot);
MessageBoxWrapUpList.Add(_elem79);
}
iprot.ReadListEnd();
}
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 2:
if (field.Type == TType.I32) {
TotalSize = iprot.ReadI32();
} 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)
{
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) {
{
WebOnlyFriends = new List<WebOnlyFriend>();
TList _list108 = iprot.ReadListBegin();
for( int _i109 = 0; _i109 < _list108.Count; ++_i109)
{
WebOnlyFriend _elem110;
_elem110 = new WebOnlyFriend();
_elem110.Read(iprot);
WebOnlyFriends.Add(_elem110);
}
iprot.ReadListEnd();
}
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 2:
if (field.Type == TType.Bool) {
HasNextPage = iprot.ReadBool();
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
default:
TProtocolUtil.Skip(iprot, field.Type);
break;
}
iprot.ReadFieldEnd();
}
iprot.ReadStructEnd();
}
示例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.List) {
{
Profiles = new List<BootstrapProfile>();
TList _list0 = iprot.ReadListBegin();
for( int _i1 = 0; _i1 < _list0.Count; ++_i1)
{
BootstrapProfile _elem2 = new BootstrapProfile();
_elem2 = new BootstrapProfile();
_elem2.Read(iprot);
Profiles.Add(_elem2);
}
iprot.ReadListEnd();
}
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 2:
if (field.Type == TType.String) {
Country = 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.List) {
{
Friends = new List<Friend>();
TList _list40 = iprot.ReadListBegin();
for( int _i41 = 0; _i41 < _list40.Count; ++_i41)
{
Friend _elem42;
_elem42 = new Friend();
_elem42.Read(iprot);
Friends.Add(_elem42);
}
iprot.ReadListEnd();
}
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 2:
if (field.Type == TType.String) {
CTag = iprot.ReadString();
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
default:
TProtocolUtil.Skip(iprot, field.Type);
break;
}
iprot.ReadFieldEnd();
}
iprot.ReadStructEnd();
}