Example #1
0
 public void MergeFrom(UserPB other)
 {
     if (other == null)
     {
         return;
     }
     if (other.UserId != 0)
     {
         UserId = other.UserId;
     }
     if (other.AccountId.Length != 0)
     {
         AccountId = other.AccountId;
     }
     if (other.ChannelAccountId.Length != 0)
     {
         ChannelAccountId = other.ChannelAccountId;
     }
     if (other.UserName.Length != 0)
     {
         UserName = other.UserName;
     }
     if (other.Logo.Length != 0)
     {
         Logo = other.Logo;
     }
     if (other.Index != 0)
     {
         Index = other.Index;
     }
     if (other.CardGatherNum != 0)
     {
         CardGatherNum = other.CardGatherNum;
     }
     apparel_.Add(other.apparel_);
     if (other.CreateTime != 0L)
     {
         CreateTime = other.CreateTime;
     }
     birthday_.Add(other.birthday_);
     if (other.userOther_ != null)
     {
         if (userOther_ == null)
         {
             userOther_ = new global::Com.Proto.UserOtherPB();
         }
         UserOther.MergeFrom(other.UserOther);
     }
 }
Example #2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    input.SkipLastField();
                    break;

                case 8: {
                    UserId = input.ReadSInt32();
                    break;
                }

                case 18: {
                    AccountId = input.ReadString();
                    break;
                }

                case 26: {
                    ChannelAccountId = input.ReadString();
                    break;
                }

                case 34: {
                    UserName = input.ReadString();
                    break;
                }

                case 42: {
                    Logo = input.ReadString();
                    break;
                }

                case 48: {
                    Index = input.ReadSInt32();
                    break;
                }

                case 56: {
                    CardGatherNum = input.ReadSInt32();
                    break;
                }

                case 66: {
                    apparel_.AddEntriesFrom(input, _map_apparel_codec);
                    break;
                }

                case 72: {
                    CreateTime = input.ReadSInt64();
                    break;
                }

                case 82: {
                    birthday_.AddEntriesFrom(input, _map_birthday_codec);
                    break;
                }

                case 90: {
                    if (userOther_ == null)
                    {
                        userOther_ = new global::Com.Proto.UserOtherPB();
                    }
                    input.ReadMessage(userOther_);
                    break;
                }
                }
            }
        }