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


C# NodeInfo.Read方法代码示例

本文整理汇总了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: 
//.........这里部分代码省略.........
开发者ID:bcardi,项目名称:storm-net-adapter,代码行数:101,代码来源:Assignment.cs


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