public static AccountFieldOptions DeserializeLengthDelimited(Stream stream) { AccountFieldOptions accountFieldOptions = new AccountFieldOptions(); AccountFieldOptions.DeserializeLengthDelimited(stream, accountFieldOptions); return(accountFieldOptions); }
public static GetAccountStateRequest Deserialize(Stream stream, GetAccountStateRequest 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 != 16) { if (num2 != 24) { if (num2 != 82) { if (num2 != 90) { 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 = AccountFieldTags.DeserializeLengthDelimited(stream); } else { AccountFieldTags.DeserializeLengthDelimited(stream, instance.Tags); } } else if (instance.Options == null) { instance.Options = AccountFieldOptions.DeserializeLengthDelimited(stream); } else { AccountFieldOptions.DeserializeLengthDelimited(stream, instance.Options); } } else { instance.Region = ProtocolParser.ReadUInt32(stream); } } else { instance.Program = ProtocolParser.ReadUInt32(stream); } } else if (instance.EntityId == null) { instance.EntityId = EntityId.DeserializeLengthDelimited(stream); } else { EntityId.DeserializeLengthDelimited(stream, instance.EntityId); } } } 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 GetAccountStateRequest Deserialize(Stream stream, GetAccountStateRequest 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.EntityId != null) { bnet.protocol.EntityId.DeserializeLengthDelimited(stream, instance.EntityId); } else { instance.EntityId = bnet.protocol.EntityId.DeserializeLengthDelimited(stream); } } else if (num == 16) { instance.Program = ProtocolParser.ReadUInt32(stream); } else if (num == 24) { instance.Region = ProtocolParser.ReadUInt32(stream); } else if (num == 82) { if (instance.Options != null) { AccountFieldOptions.DeserializeLengthDelimited(stream, instance.Options); } else { instance.Options = AccountFieldOptions.DeserializeLengthDelimited(stream); } } else if (num != 90) { 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) { AccountFieldTags.DeserializeLengthDelimited(stream, instance.Tags); } else { instance.Tags = AccountFieldTags.DeserializeLengthDelimited(stream); } } else { if (stream.Position != limit) { throw new ProtocolBufferException("Read past max limit"); } break; } } return(instance); }
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); }