public static GameAccountSelectedRequest DeserializeLengthDelimited(Stream stream) { GameAccountSelectedRequest gameAccountSelectedRequest = new GameAccountSelectedRequest(); GameAccountSelectedRequest.DeserializeLengthDelimited(stream, gameAccountSelectedRequest); return(gameAccountSelectedRequest); }
public static GameAccountSelectedRequest DeserializeLengthDelimited(Stream stream, GameAccountSelectedRequest instance) { long num = (long)((ulong)ProtocolParser.ReadUInt32(stream)); num += stream.get_Position(); return(GameAccountSelectedRequest.Deserialize(stream, instance, num)); }
public static GameAccountSelectedRequest DeserializeLengthDelimited(Stream stream, GameAccountSelectedRequest instance) { long position = (long)ProtocolParser.ReadUInt32(stream); position += stream.Position; return(GameAccountSelectedRequest.Deserialize(stream, instance, position)); }
public static void Serialize(Stream stream, GameAccountSelectedRequest instance) { stream.WriteByte(8); ProtocolParser.WriteUInt32(stream, instance.Result); if (instance.HasGameAccount) { stream.WriteByte(18); ProtocolParser.WriteUInt32(stream, instance.GameAccount.GetSerializedSize()); EntityId.Serialize(stream, instance.GameAccount); } }
public static GameAccountSelectedRequest Deserialize(Stream stream, GameAccountSelectedRequest 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 != 8) { 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.GameAccount == null) { instance.GameAccount = EntityId.DeserializeLengthDelimited(stream); } else { EntityId.DeserializeLengthDelimited(stream, instance.GameAccount); } } else { instance.Result = ProtocolParser.ReadUInt32(stream); } } } if (stream.get_Position() == limit) { return(instance); } throw new ProtocolBufferException("Read past max limit"); }
public static GameAccountSelectedRequest Deserialize(Stream stream, GameAccountSelectedRequest 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 == 8) { instance.Result = ProtocolParser.ReadUInt32(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.GameAccount != null) { EntityId.DeserializeLengthDelimited(stream, instance.GameAccount); } else { instance.GameAccount = EntityId.DeserializeLengthDelimited(stream); } } else { if (stream.Position != limit) { throw new ProtocolBufferException("Read past max limit"); } break; } } return(instance); }
public override bool Equals(object obj) { GameAccountSelectedRequest gameAccountSelectedRequest = obj as GameAccountSelectedRequest; if (gameAccountSelectedRequest == null) { return(false); } if (!this.Result.Equals(gameAccountSelectedRequest.Result)) { return(false); } if (this.HasGameAccount == gameAccountSelectedRequest.HasGameAccount && (!this.HasGameAccount || this.GameAccount.Equals(gameAccountSelectedRequest.GameAccount))) { return(true); } return(false); }
public static GameAccountSelectedRequest Deserialize(Stream stream, GameAccountSelectedRequest instance) { return(GameAccountSelectedRequest.Deserialize(stream, instance, -1L)); }
public void Deserialize(Stream stream) { GameAccountSelectedRequest.Deserialize(stream, this); }
public override bool Equals(object obj) { GameAccountSelectedRequest gameAccountSelectedRequest = obj as GameAccountSelectedRequest; return(gameAccountSelectedRequest != null && this.Result.Equals(gameAccountSelectedRequest.Result) && this.HasGameAccount == gameAccountSelectedRequest.HasGameAccount && (!this.HasGameAccount || this.GameAccount.Equals(gameAccountSelectedRequest.GameAccount))); }