public static AccountBlob DeserializeLengthDelimited(Stream stream) { AccountBlob accountBlob = new AccountBlob(); AccountBlob.DeserializeLengthDelimited(stream, accountBlob); return(accountBlob); }
public static AccountBlobList Deserialize(Stream stream, AccountBlobList instance, long limit) { if (instance.Blob == null) { instance.Blob = new List <AccountBlob>(); } 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) { instance.Blob.Add(AccountBlob.DeserializeLengthDelimited(stream)); } else { 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 (stream.Position != limit) { throw new ProtocolBufferException("Read past max limit"); } break; } } return(instance); }
public static AccountBlobList Deserialize(Stream stream, AccountBlobList instance, long limit) { if (instance.Blob == null) { instance.Blob = new List <AccountBlob>(); } 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) { 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.Blob.Add(AccountBlob.DeserializeLengthDelimited(stream)); } } } if (stream.get_Position() == limit) { return(instance); } throw new ProtocolBufferException("Read past max limit"); }
public static GetAccountResponse Deserialize(Stream stream, GetAccountResponse instance, long limit) { if (instance.Email == null) { instance.Email = new List <string>(); } if (instance.Links == null) { instance.Links = new List <GameAccountLink>(); } 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 != 90) { if (num2 != 98) { if (num2 != 106) { if (num2 != 114) { if (num2 != 122) { Key key = ProtocolParser.ReadKey((byte)num, stream); uint field = key.Field; if (field != 16u) { if (field != 17u) { if (field == 0u) { throw new ProtocolBufferException("Invalid field id: 0, something went wrong in the stream"); } ProtocolParser.SkipKey(stream, key); } else if (key.WireType == Wire.LengthDelimited) { if (instance.ParentalControlInfo == null) { instance.ParentalControlInfo = ParentalControlInfo.DeserializeLengthDelimited(stream); } else { ParentalControlInfo.DeserializeLengthDelimited(stream, instance.ParentalControlInfo); } } } else if (key.WireType == Wire.LengthDelimited) { instance.Links.Add(GameAccountLink.DeserializeLengthDelimited(stream)); } } else { instance.FullName = ProtocolParser.ReadString(stream); } } else { instance.BattleTag = ProtocolParser.ReadString(stream); } } else { instance.Email.Add(ProtocolParser.ReadString(stream)); } } else if (instance.Id == null) { instance.Id = AccountId.DeserializeLengthDelimited(stream); } else { AccountId.DeserializeLengthDelimited(stream, instance.Id); } } else if (instance.Blob == null) { instance.Blob = AccountBlob.DeserializeLengthDelimited(stream); } else { AccountBlob.DeserializeLengthDelimited(stream, instance.Blob); } } } if (stream.get_Position() == limit) { return(instance); } throw new ProtocolBufferException("Read past max limit"); }