public static GameAccountFieldTags DeserializeLengthDelimited(Stream stream) { GameAccountFieldTags gameAccountFieldTags = new GameAccountFieldTags(); GameAccountFieldTags.DeserializeLengthDelimited(stream, gameAccountFieldTags); return(gameAccountFieldTags); }
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 SubscriberReference Deserialize(Stream stream, SubscriberReference instance, long limit) { instance.ObjectId = 0UL; while (limit < 0L || stream.Position < limit) { int num = stream.ReadByte(); if (num == -1) { if (limit >= 0L) { throw new EndOfStreamException(); } return(instance); } else if (num != 8) { if (num != 18) { if (num != 26) { if (num != 34) { if (num != 42) { if (num != 50) { 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.GameAccountTags == null) { instance.GameAccountTags = GameAccountFieldTags.DeserializeLengthDelimited(stream); } else { GameAccountFieldTags.DeserializeLengthDelimited(stream, instance.GameAccountTags); } } else if (instance.GameAccountOptions == null) { instance.GameAccountOptions = GameAccountFieldOptions.DeserializeLengthDelimited(stream); } else { GameAccountFieldOptions.DeserializeLengthDelimited(stream, instance.GameAccountOptions); } } else if (instance.AccountTags == null) { instance.AccountTags = AccountFieldTags.DeserializeLengthDelimited(stream); } else { AccountFieldTags.DeserializeLengthDelimited(stream, instance.AccountTags); } } else if (instance.AccountOptions == null) { instance.AccountOptions = AccountFieldOptions.DeserializeLengthDelimited(stream); } else { AccountFieldOptions.DeserializeLengthDelimited(stream, instance.AccountOptions); } } else if (instance.EntityId == null) { instance.EntityId = EntityId.DeserializeLengthDelimited(stream); } else { EntityId.DeserializeLengthDelimited(stream, instance.EntityId); } } else { instance.ObjectId = ProtocolParser.ReadUInt64(stream); } } if (stream.Position == limit) { return(instance); } throw new ProtocolBufferException("Read past max limit"); }
public static GameAccountStateNotification Deserialize(Stream stream, GameAccountStateNotification instance, long limit) { while (limit < 0L || stream.Position < limit) { int num = stream.ReadByte(); if (num == -1) { if (limit >= 0L) { throw new EndOfStreamException(); } return(instance); } else if (num != 10) { if (num != 16) { if (num != 26) { if (num != 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.SubscriptionCompleted = ProtocolParser.ReadBool(stream); } } else if (instance.GameAccountTags == null) { instance.GameAccountTags = GameAccountFieldTags.DeserializeLengthDelimited(stream); } else { GameAccountFieldTags.DeserializeLengthDelimited(stream, instance.GameAccountTags); } } else { instance.SubscriberId = ProtocolParser.ReadUInt64(stream); } } else if (instance.State == null) { instance.State = GameAccountState.DeserializeLengthDelimited(stream); } else { GameAccountState.DeserializeLengthDelimited(stream, instance.State); } } if (stream.Position == limit) { return(instance); } throw new ProtocolBufferException("Read past max limit"); }
public static SubscriberReference Deserialize(Stream stream, SubscriberReference instance, long limit) { instance.ObjectId = (ulong)0; 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 == 8) { instance.ObjectId = ProtocolParser.ReadUInt64(stream); } else if (num == 18) { if (instance.EntityId != null) { bnet.protocol.EntityId.DeserializeLengthDelimited(stream, instance.EntityId); } else { instance.EntityId = bnet.protocol.EntityId.DeserializeLengthDelimited(stream); } } else if (num == 26) { if (instance.AccountOptions != null) { AccountFieldOptions.DeserializeLengthDelimited(stream, instance.AccountOptions); } else { instance.AccountOptions = AccountFieldOptions.DeserializeLengthDelimited(stream); } } else if (num == 34) { if (instance.AccountTags != null) { AccountFieldTags.DeserializeLengthDelimited(stream, instance.AccountTags); } else { instance.AccountTags = AccountFieldTags.DeserializeLengthDelimited(stream); } } else if (num == 42) { if (instance.GameAccountOptions != null) { GameAccountFieldOptions.DeserializeLengthDelimited(stream, instance.GameAccountOptions); } else { instance.GameAccountOptions = GameAccountFieldOptions.DeserializeLengthDelimited(stream); } } else if (num != 50) { 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.GameAccountTags != null) { GameAccountFieldTags.DeserializeLengthDelimited(stream, instance.GameAccountTags); } else { instance.GameAccountTags = GameAccountFieldTags.DeserializeLengthDelimited(stream); } } else { if (stream.Position != limit) { throw new ProtocolBufferException("Read past max limit"); } break; } } return(instance); }