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


C# ErrorInfo.Read方法代码示例

本文整理汇总了C#中ErrorInfo.Read方法的典型用法代码示例。如果您正苦于以下问题:C# ErrorInfo.Read方法的具体用法?C# ErrorInfo.Read怎么用?C# ErrorInfo.Read使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ErrorInfo的用法示例。


在下文中一共展示了ErrorInfo.Read方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Read

 public void Read (TProtocol iprot)
 {
   bool isset_id = false;
   bool isset_name = false;
   bool isset_uptime_secs = false;
   bool isset_executors = false;
   bool isset_status = false;
   bool isset_errors = 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) {
           Id = iprot.ReadString();
           isset_id = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.String) {
           Name = iprot.ReadString();
           isset_name = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.I32) {
           Uptime_secs = iprot.ReadI32();
           isset_uptime_secs = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.List) {
           {
             Executors = new List<ExecutorSummary>();
             TList _list145 = iprot.ReadListBegin();
             for( int _i146 = 0; _i146 < _list145.Count; ++_i146)
             {
               ExecutorSummary _elem147;
               _elem147 = new ExecutorSummary();
               _elem147.Read(iprot);
               Executors.Add(_elem147);
             }
             iprot.ReadListEnd();
           }
           isset_executors = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 5:
         if (field.Type == TType.String) {
           Status = iprot.ReadString();
           isset_status = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 6:
         if (field.Type == TType.Map) {
           {
             Errors = new Dictionary<string, List<ErrorInfo>>();
             TMap _map148 = iprot.ReadMapBegin();
             for( int _i149 = 0; _i149 < _map148.Count; ++_i149)
             {
               string _key150;
               List<ErrorInfo> _val151;
               _key150 = iprot.ReadString();
               {
                 _val151 = new List<ErrorInfo>();
                 TList _list152 = iprot.ReadListBegin();
                 for( int _i153 = 0; _i153 < _list152.Count; ++_i153)
                 {
                   ErrorInfo _elem154;
                   _elem154 = new ErrorInfo();
                   _elem154.Read(iprot);
                   _val151.Add(_elem154);
                 }
                 iprot.ReadListEnd();
               }
               Errors[_key150] = _val151;
             }
             iprot.ReadMapEnd();
           }
           isset_errors = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
//.........这里部分代码省略.........
开发者ID:bcardi,项目名称:storm-net-adapter,代码行数:101,代码来源:TopologyInfo.cs


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