/// <summary> /// Create an instance of primitive type from the xml reader /// </summary> /// <param name="reader">The xml reader</param> /// <remarks>The reader is expected to be placed at the beginning of the element, and after this method call, the reader will be placed /// at the EndElement, such that the next Element will be read in the next Read call.</remarks> /// <returns>An instance of primitive type</returns> internal override PrimitiveParserToken TokenizeFromXml(XmlReader reader) { Debug.Assert(reader.NodeType == XmlNodeType.Element, "reader at element"); reader.ReadStartElement(); // <d:Property> var g = new InstancePrimitiveParserToken <Geometry>(GmlFormatter.Create().Read <Geometry>(reader)); Debug.Assert(reader.NodeType == XmlNodeType.EndElement, "reader at end of current element"); return(g); }
/// <summary> /// Create an instance of primitive type from the xml reader /// </summary> /// <param name="reader">The xml reader</param> /// <remarks>The reader is expected to be placed at the beginning of the element, and after this method call, the reader will be placed /// at the EndElement, such that the next Element will be read in the next Read call.</remarks> /// <returns>An instance of primitive type</returns> internal override PrimitiveParserToken TokenizeFromXml(XmlReader reader) { Debug.Assert(reader.NodeType == XmlNodeType.Element, "reader at element"); reader.ReadStartElement(); // <d:Property> var g = new InstancePrimitiveParserToken<Geometry>(GmlFormatter.Create().Read<Geometry>(reader)); Debug.Assert(reader.NodeType == XmlNodeType.EndElement, "reader at end of current element"); return g; }