public static GetGameAccountStateResponse DeserializeLengthDelimited(Stream stream)
        {
            GetGameAccountStateResponse getGameAccountStateResponse = new GetGameAccountStateResponse();

            GetGameAccountStateResponse.DeserializeLengthDelimited(stream, getGameAccountStateResponse);
            return(getGameAccountStateResponse);
        }
        public static GetGameAccountStateResponse DeserializeLengthDelimited(Stream stream, GetGameAccountStateResponse instance)
        {
            long num = (long)((ulong)ProtocolParser.ReadUInt32(stream));

            num += stream.get_Position();
            return(GetGameAccountStateResponse.Deserialize(stream, instance, num));
        }
        public static GetGameAccountStateResponse DeserializeLengthDelimited(Stream stream, GetGameAccountStateResponse instance)
        {
            long position = (long)ProtocolParser.ReadUInt32(stream);

            position += stream.Position;
            return(GetGameAccountStateResponse.Deserialize(stream, instance, position));
        }
 public static GetGameAccountStateResponse Deserialize(Stream stream, GetGameAccountStateResponse instance, long limit)
 {
     while (true)
     {
         if (limit < (long)0 || stream.Position < limit)
         {
             int num = stream.ReadByte();
             if (num == -1)
             {
                 if (limit >= (long)0)
                 {
                     throw new EndOfStreamException();
                 }
                 break;
             }
             else if (num == 10)
             {
                 if (instance.State != null)
                 {
                     GameAccountState.DeserializeLengthDelimited(stream, instance.State);
                 }
                 else
                 {
                     instance.State = GameAccountState.DeserializeLengthDelimited(stream);
                 }
             }
             else if (num != 18)
             {
                 Key key = ProtocolParser.ReadKey((byte)num, stream);
                 if (key.Field == 0)
                 {
                     throw new ProtocolBufferException("Invalid field id: 0, something went wrong in the stream");
                 }
                 ProtocolParser.SkipKey(stream, key);
             }
             else if (instance.Tags != null)
             {
                 GameAccountFieldTags.DeserializeLengthDelimited(stream, instance.Tags);
             }
             else
             {
                 instance.Tags = GameAccountFieldTags.DeserializeLengthDelimited(stream);
             }
         }
         else
         {
             if (stream.Position != limit)
             {
                 throw new ProtocolBufferException("Read past max limit");
             }
             break;
         }
     }
     return(instance);
 }
 public static GetGameAccountStateResponse Deserialize(Stream stream, GetGameAccountStateResponse instance, long limit)
 {
     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 != 10)
             {
                 if (num2 != 18)
                 {
                     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 if (instance.Tags == null)
                 {
                     instance.Tags = GameAccountFieldTags.DeserializeLengthDelimited(stream);
                 }
                 else
                 {
                     GameAccountFieldTags.DeserializeLengthDelimited(stream, instance.Tags);
                 }
             }
             else if (instance.State == null)
             {
                 instance.State = GameAccountState.DeserializeLengthDelimited(stream);
             }
             else
             {
                 GameAccountState.DeserializeLengthDelimited(stream, instance.State);
             }
         }
     }
     if (stream.get_Position() == limit)
     {
         return(instance);
     }
     throw new ProtocolBufferException("Read past max limit");
 }
 public static void Serialize(Stream stream, GetGameAccountStateResponse instance)
 {
     if (instance.HasState)
     {
         stream.WriteByte(10);
         ProtocolParser.WriteUInt32(stream, instance.State.GetSerializedSize());
         GameAccountState.Serialize(stream, instance.State);
     }
     if (instance.HasTags)
     {
         stream.WriteByte(18);
         ProtocolParser.WriteUInt32(stream, instance.Tags.GetSerializedSize());
         GameAccountFieldTags.Serialize(stream, instance.Tags);
     }
 }
        public override bool Equals(object obj)
        {
            GetGameAccountStateResponse getGameAccountStateResponse = obj as GetGameAccountStateResponse;

            if (getGameAccountStateResponse == null)
            {
                return(false);
            }
            if (this.HasState != getGameAccountStateResponse.HasState || this.HasState && !this.State.Equals(getGameAccountStateResponse.State))
            {
                return(false);
            }
            if (this.HasTags == getGameAccountStateResponse.HasTags && (!this.HasTags || this.Tags.Equals(getGameAccountStateResponse.Tags)))
            {
                return(true);
            }
            return(false);
        }
 public static GetGameAccountStateResponse Deserialize(Stream stream, GetGameAccountStateResponse instance)
 {
     return(GetGameAccountStateResponse.Deserialize(stream, instance, -1L));
 }
 public void Deserialize(Stream stream)
 {
     GetGameAccountStateResponse.Deserialize(stream, this);
 }
        public override bool Equals(object obj)
        {
            GetGameAccountStateResponse getGameAccountStateResponse = obj as GetGameAccountStateResponse;

            return(getGameAccountStateResponse != null && this.HasState == getGameAccountStateResponse.HasState && (!this.HasState || this.State.Equals(getGameAccountStateResponse.State)) && this.HasTags == getGameAccountStateResponse.HasTags && (!this.HasTags || this.Tags.Equals(getGameAccountStateResponse.Tags)));
        }