예제 #1
0
파일: Model.cs 프로젝트: jlekie/axon-csharp
        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();
            }
        }
예제 #2
0
 public override void WriteModelStart(ModelHeader header)
 {
     this.WriteStringValue(header.ModelName);
     this.WriteIntegerValue(header.PropertyCount);
 }
예제 #3
0
 public abstract void WriteModelStart(ModelHeader header);
예제 #4
0
 public override void WriteModelStart(ModelHeader header)
 {
     this.EncoderStream.WriteStartElement("Model");
     this.EncoderStream.WriteAttributeString("ModelName", header.ModelName);
     this.EncoderStream.WriteAttributeString("PropertyCount", header.PropertyCount.ToString());
 }