상속: TBase
예제 #1
0
파일: Task.cs 프로젝트: zbw911/CS4Hadoop
 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) {
       TaskId = iprot.ReadString();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 2:
     if (field.Type == TType.I32) {
       TaskType = (TaskType)iprot.ReadI32();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 3:
     if (field.Type == TType.Map) {
       {
         TaskAttributes = new Dictionary<string, string>();
         TMap _map22 = iprot.ReadMapBegin();
         for( int _i23 = 0; _i23 < _map22.Count; ++_i23)
         {
           string _key24;
           string _val25;
           _key24 = iprot.ReadString();
           _val25 = iprot.ReadString();
           TaskAttributes[_key24] = _val25;
         }
         iprot.ReadMapEnd();
       }
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 4:
     if (field.Type == TType.Map) {
       {
         TaskCounters = new Dictionary<string, long>();
         TMap _map26 = iprot.ReadMapBegin();
         for( int _i27 = 0; _i27 < _map26.Count; ++_i27)
         {
           string _key28;
           long _val29;
           _key28 = iprot.ReadString();
           _val29 = iprot.ReadI64();
           TaskCounters[_key28] = _val29;
         }
         iprot.ReadMapEnd();
       }
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 5:
     if (field.Type == TType.Struct) {
       OperatorGraph = new Graph();
       OperatorGraph.Read(iprot);
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 6:
     if (field.Type == TType.List) {
       {
         OperatorList = new List<Operator>();
         TList _list30 = iprot.ReadListBegin();
         for( int _i31 = 0; _i31 < _list30.Count; ++_i31)
         {
           Operator _elem32 = new Operator();
           _elem32 = new Operator();
           _elem32.Read(iprot);
           OperatorList.Add(_elem32);
         }
         iprot.ReadListEnd();
       }
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 7:
     if (field.Type == TType.Bool) {
       Done = iprot.ReadBool();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 8:
     if (field.Type == TType.Bool) {
       Started = iprot.ReadBool();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       default:
     TProtocolUtil.Skip(iprot, field.Type);
     break;
     }
     iprot.ReadFieldEnd();
       }
       iprot.ReadStructEnd();
 }