public void Read(IProtocolReader protocol, ModelHeader modelHeader) { for (var a = 0; a < modelHeader.PropertyCount; a++) { var propertyHeader = protocol.ReadModelPropertyStart(); if (!this.ReadProperty(protocol, propertyHeader)) { throw new Exception("Property " + propertyHeader.PropertyName + " not recognized"); } protocol.ReadModelPropertyEnd(); } }
public override void WriteModelStart(ModelHeader header) { this.WriteStringValue(header.ModelName); this.WriteIntegerValue(header.PropertyCount); }
public abstract void WriteModelStart(ModelHeader header);
public override void WriteModelStart(ModelHeader header) { this.EncoderStream.WriteStartElement("Model"); this.EncoderStream.WriteAttributeString("ModelName", header.ModelName); this.EncoderStream.WriteAttributeString("PropertyCount", header.PropertyCount.ToString()); }