public Thrift.Protocol.TBase Convert(Character.AbstractBusinessObject o)
 {
     if (null == o)
     {
         return null;
     }
     CharMissionData data = o as CharMissionData;
     CharMissionInfo info = new CharMissionInfo();
     info.CharId = data.CharId;
     info.CharMissionInfoList = new List<MissionInfo>();
     for (int i = 0; i < data.MissionList.Count; ++i)
     {
         info.CharMissionInfoList.Add(DeepCopy(data.MissionList[i]));
     }
     return info;
 }
Esempio n. 2
0
        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.Struct)
                    {
                        CharBaseInfo = new CharBaseInfo();
                        CharBaseInfo.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 20:
                    if (field.Type == TType.Struct)
                    {
                        CharCounterInfo = new CharCounterInfo();
                        CharCounterInfo.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 30:
                    if (field.Type == TType.Struct)
                    {
                        CharBagInfo = new CharBagInfo();
                        CharBagInfo.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 40:
                    if (field.Type == TType.Struct)
                    {
                        CharMissionInfo = new CharMissionInfo();
                        CharMissionInfo.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }