本文整理汇总了C#中NodeInfo.Read方法的典型用法代码示例。如果您正苦于以下问题:C# NodeInfo.Read方法的具体用法?C# NodeInfo.Read怎么用?C# NodeInfo.Read使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NodeInfo
的用法示例。
在下文中一共展示了NodeInfo.Read方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Read
public void Read (TProtocol iprot)
{
bool isset_master_code_dir = 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) {
Master_code_dir = iprot.ReadString();
isset_master_code_dir = true;
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 2:
if (field.Type == TType.Map) {
{
Node_host = new Dictionary<string, string>();
TMap _map185 = iprot.ReadMapBegin();
for( int _i186 = 0; _i186 < _map185.Count; ++_i186)
{
string _key187;
string _val188;
_key187 = iprot.ReadString();
_val188 = iprot.ReadString();
Node_host[_key187] = _val188;
}
iprot.ReadMapEnd();
}
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 3:
if (field.Type == TType.Map) {
{
Executor_node_port = new Dictionary<List<long>, NodeInfo>();
TMap _map189 = iprot.ReadMapBegin();
for( int _i190 = 0; _i190 < _map189.Count; ++_i190)
{
List<long> _key191;
NodeInfo _val192;
{
_key191 = new List<long>();
TList _list193 = iprot.ReadListBegin();
for( int _i194 = 0; _i194 < _list193.Count; ++_i194)
{
long _elem195;
_elem195 = iprot.ReadI64();
_key191.Add(_elem195);
}
iprot.ReadListEnd();
}
_val192 = new NodeInfo();
_val192.Read(iprot);
Executor_node_port[_key191] = _val192;
}
iprot.ReadMapEnd();
}
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 4:
if (field.Type == TType.Map) {
{
Executor_start_time_secs = new Dictionary<List<long>, long>();
TMap _map196 = iprot.ReadMapBegin();
for( int _i197 = 0; _i197 < _map196.Count; ++_i197)
{
List<long> _key198;
long _val199;
{
_key198 = new List<long>();
TList _list200 = iprot.ReadListBegin();
for( int _i201 = 0; _i201 < _list200.Count; ++_i201)
{
long _elem202;
_elem202 = iprot.ReadI64();
_key198.Add(_elem202);
}
iprot.ReadListEnd();
}
_val199 = iprot.ReadI64();
Executor_start_time_secs[_key198] = _val199;
}
iprot.ReadMapEnd();
}
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
default:
//.........这里部分代码省略.........