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