public static GameAccountFieldTags DeserializeLengthDelimited(Stream stream) { GameAccountFieldTags gameAccountFieldTags = new GameAccountFieldTags(); GameAccountFieldTags.DeserializeLengthDelimited(stream, gameAccountFieldTags); return(gameAccountFieldTags); }
public static void Serialize(Stream stream, GameAccountStateNotification instance) { if (instance.HasState) { stream.WriteByte(10); ProtocolParser.WriteUInt32(stream, instance.State.GetSerializedSize()); GameAccountState.Serialize(stream, instance.State); } if (instance.HasSubscriberId) { stream.WriteByte(16); ProtocolParser.WriteUInt64(stream, instance.SubscriberId); } if (instance.HasGameAccountTags) { stream.WriteByte(26); ProtocolParser.WriteUInt32(stream, instance.GameAccountTags.GetSerializedSize()); GameAccountFieldTags.Serialize(stream, instance.GameAccountTags); } if (instance.HasSubscriptionCompleted) { stream.WriteByte(32); ProtocolParser.WriteBool(stream, instance.SubscriptionCompleted); } }
public static GameAccountFieldTags DeserializeLengthDelimited(Stream stream, GameAccountFieldTags instance) { long num = (long)((ulong)ProtocolParser.ReadUInt32(stream)); num += stream.get_Position(); return(GameAccountFieldTags.Deserialize(stream, instance, num)); }
public static void Serialize(Stream stream, GetGameAccountStateRequest instance) { if (instance.HasAccountId) { stream.WriteByte(10); ProtocolParser.WriteUInt32(stream, instance.AccountId.GetSerializedSize()); EntityId.Serialize(stream, instance.AccountId); } if (instance.HasGameAccountId) { stream.WriteByte(18); ProtocolParser.WriteUInt32(stream, instance.GameAccountId.GetSerializedSize()); EntityId.Serialize(stream, instance.GameAccountId); } if (instance.HasOptions) { stream.WriteByte(82); ProtocolParser.WriteUInt32(stream, instance.Options.GetSerializedSize()); GameAccountFieldOptions.Serialize(stream, instance.Options); } if (instance.HasTags) { stream.WriteByte(90); ProtocolParser.WriteUInt32(stream, instance.Tags.GetSerializedSize()); GameAccountFieldTags.Serialize(stream, instance.Tags); } }
public static GameAccountFieldTags DeserializeLengthDelimited(Stream stream, GameAccountFieldTags instance) { long position = (long)ProtocolParser.ReadUInt32(stream); position += stream.Position; return(GameAccountFieldTags.Deserialize(stream, instance, position)); }
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 GameAccountFieldTags Deserialize(Stream stream, GameAccountFieldTags instance, long limit) { BinaryReader binaryReader = new BinaryReader(stream); 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 != 21) { if (num2 != 29) { if (num2 != 37) { 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.GameStatusTag = binaryReader.ReadUInt32(); } } else { instance.GameTimeInfoTag = binaryReader.ReadUInt32(); } } else { instance.GameLevelInfoTag = binaryReader.ReadUInt32(); } } } if (stream.get_Position() == limit) { return(instance); } throw new ProtocolBufferException("Read past max limit"); }
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 GameAccountFieldTags Deserialize(Stream stream, GameAccountFieldTags instance, long limit) { BinaryReader binaryReader = new BinaryReader(stream); 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 == 21) { instance.GameLevelInfoTag = binaryReader.ReadUInt32(); } else if (num == 29) { instance.GameTimeInfoTag = binaryReader.ReadUInt32(); } else if (num == 37) { instance.GameStatusTag = binaryReader.ReadUInt32(); } 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 void Serialize(Stream stream, GameAccountStateTagged instance) { if (instance.HasGameAccountState) { stream.WriteByte(10); ProtocolParser.WriteUInt32(stream, instance.GameAccountState.GetSerializedSize()); bnet.protocol.account.GameAccountState.Serialize(stream, instance.GameAccountState); } if (instance.HasGameAccountTags) { stream.WriteByte(18); ProtocolParser.WriteUInt32(stream, instance.GameAccountTags.GetSerializedSize()); GameAccountFieldTags.Serialize(stream, instance.GameAccountTags); } }
public static void Serialize(Stream stream, GetGameAccountStateResponse instance) { if (instance.HasState) { stream.WriteByte(10); ProtocolParser.WriteUInt32(stream, instance.State.GetSerializedSize()); GameAccountState.Serialize(stream, instance.State); } if (instance.HasTags) { stream.WriteByte(18); ProtocolParser.WriteUInt32(stream, instance.Tags.GetSerializedSize()); GameAccountFieldTags.Serialize(stream, instance.Tags); } }
public static void Serialize(Stream stream, GameAccountFieldTags instance) { BinaryWriter binaryWriter = new BinaryWriter(stream); if (instance.HasGameLevelInfoTag) { stream.WriteByte(21); binaryWriter.Write(instance.GameLevelInfoTag); } if (instance.HasGameTimeInfoTag) { stream.WriteByte(29); binaryWriter.Write(instance.GameTimeInfoTag); } if (instance.HasGameStatusTag) { stream.WriteByte(37); binaryWriter.Write(instance.GameStatusTag); } }
public override bool Equals(object obj) { GameAccountFieldTags gameAccountFieldTag = obj as GameAccountFieldTags; if (gameAccountFieldTag == null) { return(false); } if (this.HasGameLevelInfoTag != gameAccountFieldTag.HasGameLevelInfoTag || this.HasGameLevelInfoTag && !this.GameLevelInfoTag.Equals(gameAccountFieldTag.GameLevelInfoTag)) { return(false); } if (this.HasGameTimeInfoTag != gameAccountFieldTag.HasGameTimeInfoTag || this.HasGameTimeInfoTag && !this.GameTimeInfoTag.Equals(gameAccountFieldTag.GameTimeInfoTag)) { return(false); } if (this.HasGameStatusTag == gameAccountFieldTag.HasGameStatusTag && (!this.HasGameStatusTag || this.GameStatusTag.Equals(gameAccountFieldTag.GameStatusTag))) { return(true); } return(false); }
public static void Serialize(Stream stream, SubscriberReference instance) { if (instance.HasObjectId) { stream.WriteByte(8); ProtocolParser.WriteUInt64(stream, instance.ObjectId); } if (instance.HasEntityId) { stream.WriteByte(18); ProtocolParser.WriteUInt32(stream, instance.EntityId.GetSerializedSize()); EntityId.Serialize(stream, instance.EntityId); } if (instance.HasAccountOptions) { stream.WriteByte(26); ProtocolParser.WriteUInt32(stream, instance.AccountOptions.GetSerializedSize()); AccountFieldOptions.Serialize(stream, instance.AccountOptions); } if (instance.HasAccountTags) { stream.WriteByte(34); ProtocolParser.WriteUInt32(stream, instance.AccountTags.GetSerializedSize()); AccountFieldTags.Serialize(stream, instance.AccountTags); } if (instance.HasGameAccountOptions) { stream.WriteByte(42); ProtocolParser.WriteUInt32(stream, instance.GameAccountOptions.GetSerializedSize()); GameAccountFieldOptions.Serialize(stream, instance.GameAccountOptions); } if (instance.HasGameAccountTags) { stream.WriteByte(50); ProtocolParser.WriteUInt32(stream, instance.GameAccountTags.GetSerializedSize()); GameAccountFieldTags.Serialize(stream, instance.GameAccountTags); } }
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 = 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 void SetTags(GameAccountFieldTags val) { this.Tags = val; }
public static GameAccountFieldTags Deserialize(Stream stream, GameAccountFieldTags instance) { return(GameAccountFieldTags.Deserialize(stream, instance, -1L)); }
public void Deserialize(Stream stream) { GameAccountFieldTags.Deserialize(stream, this); }
public override bool Equals(object obj) { GameAccountFieldTags gameAccountFieldTags = obj as GameAccountFieldTags; return(gameAccountFieldTags != null && this.HasGameLevelInfoTag == gameAccountFieldTags.HasGameLevelInfoTag && (!this.HasGameLevelInfoTag || this.GameLevelInfoTag.Equals(gameAccountFieldTags.GameLevelInfoTag)) && this.HasGameTimeInfoTag == gameAccountFieldTags.HasGameTimeInfoTag && (!this.HasGameTimeInfoTag || this.GameTimeInfoTag.Equals(gameAccountFieldTags.GameTimeInfoTag)) && this.HasGameStatusTag == gameAccountFieldTags.HasGameStatusTag && (!this.HasGameStatusTag || this.GameStatusTag.Equals(gameAccountFieldTags.GameStatusTag))); }
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); }