コード例 #1
0
        /// <inheritdoc />
        internal override void Serialize(XmlWriter writer)
        {
            base.Serialize(writer);

            if (ReferenceProfile != null)
            {
                writer.WriteStartElement("ReferenceProfile");
                ReferenceProfile.Serialize(writer);
                writer.WriteEndElement();
            }

            if (MeasureProfile != null)
            {
                writer.WriteStartElement("MeasureProfile");
                MeasureProfile.Serialize(writer);
                writer.WriteEndElement();
            }

            writer.WriteStartElement("Flush");
            writer.WriteAttributeString("ConnectionType", FlushConnectionType.ToString());
            writer.WriteString(XmlConvert.ToString(FlushValue));
            writer.WriteEndElement();

            writer.WriteStartElement("Gap");
            writer.WriteAttributeString("ConnectionType", GapConnectionType.ToString());
            writer.WriteString(XmlConvert.ToString(GapValue));
            writer.WriteEndElement();
        }
コード例 #2
0
        /// <summary>
        /// Writes the geometry information to the specified <see cref="XmlWriter" />.
        /// </summary>
        /// <param name="writer">The writer.</param>
        /// <exception cref="System.ArgumentNullException">writer</exception>
        public override void Serialize(XmlWriter writer)
        {
            if (writer == null)
            {
                throw new ArgumentNullException(nameof(writer));
            }

            writer.WriteStartElement("CoordinateSystem");
            CoordinateSystem.Serialize(writer);
            writer.WriteEndElement();

            if (ReferenceProfile != null)
            {
                writer.WriteStartElement("ReferenceProfile");
                ReferenceProfile.Serialize(writer);
                writer.WriteEndElement();
            }

            if (MeasureProfile != null)
            {
                writer.WriteStartElement("MeasureProfile");
                MeasureProfile.Serialize(writer);
                writer.WriteEndElement();
            }

            writer.WriteStartElement("Flush");
            writer.WriteAttributeString("ConnectionType", FlushConnectionType.ToString());
            writer.WriteString(XmlConvert.ToString(FlushValue));
            writer.WriteEndElement();

            writer.WriteStartElement("Gap");
            writer.WriteAttributeString("ConnectionType", GapConnectionType.ToString());
            writer.WriteString(XmlConvert.ToString(GapValue));
            writer.WriteEndElement();
        }