public static GetAllValuesForAttributeRequest DeserializeLengthDelimited(Stream stream, GetAllValuesForAttributeRequest instance) { long num = (long)((ulong)ProtocolParser.ReadUInt32(stream)); num += stream.get_Position(); return(GetAllValuesForAttributeRequest.Deserialize(stream, instance, num)); }
public static GetAllValuesForAttributeRequest DeserializeLengthDelimited(Stream stream, GetAllValuesForAttributeRequest instance) { long position = (long)ProtocolParser.ReadUInt32(stream); position += stream.Position; return(GetAllValuesForAttributeRequest.Deserialize(stream, instance, position)); }
public static GetAllValuesForAttributeRequest DeserializeLengthDelimited(Stream stream) { GetAllValuesForAttributeRequest getAllValuesForAttributeRequest = new GetAllValuesForAttributeRequest(); GetAllValuesForAttributeRequest.DeserializeLengthDelimited(stream, getAllValuesForAttributeRequest); return(getAllValuesForAttributeRequest); }
public static GetAllValuesForAttributeRequest Deserialize(Stream stream, GetAllValuesForAttributeRequest 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 != 10) { if (num2 != 18) { if (num2 != 45) { 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.Program = binaryReader.ReadUInt32(); } } else if (instance.AgentId == null) { instance.AgentId = EntityId.DeserializeLengthDelimited(stream); } else { EntityId.DeserializeLengthDelimited(stream, instance.AgentId); } } else { instance.AttributeKey = ProtocolParser.ReadString(stream); } } } if (stream.get_Position() == limit) { return(instance); } throw new ProtocolBufferException("Read past max limit"); }
public static void Serialize(Stream stream, GetAllValuesForAttributeRequest instance) { BinaryWriter binaryWriter = new BinaryWriter(stream); if (instance.HasAttributeKey) { stream.WriteByte(10); ProtocolParser.WriteBytes(stream, Encoding.get_UTF8().GetBytes(instance.AttributeKey)); } if (instance.HasAgentId) { stream.WriteByte(18); ProtocolParser.WriteUInt32(stream, instance.AgentId.GetSerializedSize()); EntityId.Serialize(stream, instance.AgentId); } if (instance.HasProgram) { stream.WriteByte(45); binaryWriter.Write(instance.Program); } }
public override bool Equals(object obj) { GetAllValuesForAttributeRequest getAllValuesForAttributeRequest = obj as GetAllValuesForAttributeRequest; if (getAllValuesForAttributeRequest == null) { return(false); } if (this.HasAttributeKey != getAllValuesForAttributeRequest.HasAttributeKey || this.HasAttributeKey && !this.AttributeKey.Equals(getAllValuesForAttributeRequest.AttributeKey)) { return(false); } if (this.HasAgentId != getAllValuesForAttributeRequest.HasAgentId || this.HasAgentId && !this.AgentId.Equals(getAllValuesForAttributeRequest.AgentId)) { return(false); } if (this.HasProgram == getAllValuesForAttributeRequest.HasProgram && (!this.HasProgram || this.Program.Equals(getAllValuesForAttributeRequest.Program))) { return(true); } return(false); }
public static GetAllValuesForAttributeRequest Deserialize(Stream stream, GetAllValuesForAttributeRequest instance) { return(GetAllValuesForAttributeRequest.Deserialize(stream, instance, -1L)); }
public void Deserialize(Stream stream) { GetAllValuesForAttributeRequest.Deserialize(stream, this); }
public override bool Equals(object obj) { GetAllValuesForAttributeRequest getAllValuesForAttributeRequest = obj as GetAllValuesForAttributeRequest; return(getAllValuesForAttributeRequest != null && this.HasAttributeKey == getAllValuesForAttributeRequest.HasAttributeKey && (!this.HasAttributeKey || this.AttributeKey.Equals(getAllValuesForAttributeRequest.AttributeKey)) && this.HasAgentId == getAllValuesForAttributeRequest.HasAgentId && (!this.HasAgentId || this.AgentId.Equals(getAllValuesForAttributeRequest.AgentId)) && this.HasProgram == getAllValuesForAttributeRequest.HasProgram && (!this.HasProgram || this.Program.Equals(getAllValuesForAttributeRequest.Program))); }