/// <summary> /// Reading is a blocking operation that keeps trying until the reader /// produces a valid message. This simplifies reading messages from /// continuous streams. /// </summary> public void Read(ObjectReader reader) { this.ResetMembers(); if (reader.ReadStartObject()) { while (reader.ReadNextMemberKey()) { this.ReadMember(reader); } reader.ReadEndObject(); } }
public void Read(ObjectReader reader) { if (reader.ReadStartObject()) { while (reader.ReadNextMemberKey()) { if (reader.MemberKey == 1) { this.Operation = (ControlOp)reader.ReadValueAsInt32(); } } reader.ReadEndObject(); } }