public static GetPlayerVariablesResponse DeserializeLengthDelimited(Stream stream, GetPlayerVariablesResponse instance) { long position = (long)ProtocolParser.ReadUInt32(stream); position += stream.Position; return(GetPlayerVariablesResponse.Deserialize(stream, instance, position)); }
public static GetPlayerVariablesResponse DeserializeLengthDelimited(Stream stream) { GetPlayerVariablesResponse getPlayerVariablesResponse = new GetPlayerVariablesResponse(); GetPlayerVariablesResponse.DeserializeLengthDelimited(stream, getPlayerVariablesResponse); return(getPlayerVariablesResponse); }
public static GetPlayerVariablesResponse DeserializeLengthDelimited(Stream stream, GetPlayerVariablesResponse instance) { long num = (long)((ulong)ProtocolParser.ReadUInt32(stream)); num += stream.get_Position(); return(GetPlayerVariablesResponse.Deserialize(stream, instance, num)); }
public static void Serialize(Stream stream, GetPlayerVariablesResponse instance) { if (instance.PlayerVariables.Count > 0) { foreach (bnet.protocol.game_utilities.PlayerVariables playerVariable in instance.PlayerVariables) { stream.WriteByte(10); ProtocolParser.WriteUInt32(stream, playerVariable.GetSerializedSize()); bnet.protocol.game_utilities.PlayerVariables.Serialize(stream, playerVariable); } } }
public static void Serialize(Stream stream, GetPlayerVariablesResponse instance) { if (instance.PlayerVariables.get_Count() > 0) { using (List <PlayerVariables> .Enumerator enumerator = instance.PlayerVariables.GetEnumerator()) { while (enumerator.MoveNext()) { PlayerVariables current = enumerator.get_Current(); stream.WriteByte(10); ProtocolParser.WriteUInt32(stream, current.GetSerializedSize()); bnet.protocol.game_utilities.PlayerVariables.Serialize(stream, current); } } } }
public static GetPlayerVariablesResponse Deserialize(Stream stream, GetPlayerVariablesResponse instance, long limit) { if (instance.PlayerVariables == null) { instance.PlayerVariables = new List <bnet.protocol.game_utilities.PlayerVariables>(); } 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) { instance.PlayerVariables.Add(bnet.protocol.game_utilities.PlayerVariables.DeserializeLengthDelimited(stream)); } 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 override bool Equals(object obj) { GetPlayerVariablesResponse getPlayerVariablesResponse = obj as GetPlayerVariablesResponse; if (getPlayerVariablesResponse == null) { return(false); } if (this.PlayerVariables.Count != getPlayerVariablesResponse.PlayerVariables.Count) { return(false); } for (int i = 0; i < this.PlayerVariables.Count; i++) { if (!this.PlayerVariables[i].Equals(getPlayerVariablesResponse.PlayerVariables[i])) { return(false); } } return(true); }
public override bool Equals(object obj) { GetPlayerVariablesResponse getPlayerVariablesResponse = obj as GetPlayerVariablesResponse; if (getPlayerVariablesResponse == null) { return(false); } if (this.PlayerVariables.get_Count() != getPlayerVariablesResponse.PlayerVariables.get_Count()) { return(false); } for (int i = 0; i < this.PlayerVariables.get_Count(); i++) { if (!this.PlayerVariables.get_Item(i).Equals(getPlayerVariablesResponse.PlayerVariables.get_Item(i))) { return(false); } } return(true); }
public static GetPlayerVariablesResponse Deserialize(Stream stream, GetPlayerVariablesResponse instance) { return(GetPlayerVariablesResponse.Deserialize(stream, instance, (long)-1)); }
public void Deserialize(Stream stream) { GetPlayerVariablesResponse.Deserialize(stream, this); }