public static AccountInfo Deserialize(Stream stream, AccountInfo instance)
 {
     return(AccountInfo.Deserialize(stream, instance, -1L));
 }
        public override bool Equals(object obj)
        {
            AccountInfo accountInfo = obj as AccountInfo;

            return(accountInfo != null && this.HasAccountPaid == accountInfo.HasAccountPaid && (!this.HasAccountPaid || this.AccountPaid.Equals(accountInfo.AccountPaid)) && this.HasCountryId == accountInfo.HasCountryId && (!this.HasCountryId || this.CountryId.Equals(accountInfo.CountryId)) && this.HasBattleTag == accountInfo.HasBattleTag && (!this.HasBattleTag || this.BattleTag.Equals(accountInfo.BattleTag)) && this.HasManualReview == accountInfo.HasManualReview && (!this.HasManualReview || this.ManualReview.Equals(accountInfo.ManualReview)));
        }
 public void Deserialize(Stream stream)
 {
     AccountInfo.Deserialize(stream, this);
 }
        public static AccountInfo Deserialize(Stream stream, AccountInfo instance, long limit)
        {
            BinaryReader binaryReader = new BinaryReader(stream);

            instance.AccountPaid  = false;
            instance.CountryId    = 0u;
            instance.ManualReview = false;
            while (limit < 0L || stream.get_Position() < limit)
            {
                int num = stream.ReadByte();
                if (num == -1)
                {
                    if (limit >= 0L)
                    {
                        throw new EndOfStreamException();
                    }
                    return(instance);
                }
                else
                {
                    int num2 = num;
                    if (num2 != 8)
                    {
                        if (num2 != 21)
                        {
                            if (num2 != 26)
                            {
                                if (num2 != 32)
                                {
                                    Key  key   = ProtocolParser.ReadKey((byte)num, stream);
                                    uint field = key.Field;
                                    if (field == 0u)
                                    {
                                        throw new ProtocolBufferException("Invalid field id: 0, something went wrong in the stream");
                                    }
                                    ProtocolParser.SkipKey(stream, key);
                                }
                                else
                                {
                                    instance.ManualReview = ProtocolParser.ReadBool(stream);
                                }
                            }
                            else
                            {
                                instance.BattleTag = ProtocolParser.ReadString(stream);
                            }
                        }
                        else
                        {
                            instance.CountryId = binaryReader.ReadUInt32();
                        }
                    }
                    else
                    {
                        instance.AccountPaid = ProtocolParser.ReadBool(stream);
                    }
                }
            }
            if (stream.get_Position() == limit)
            {
                return(instance);
            }
            throw new ProtocolBufferException("Read past max limit");
        }