/// <summary> /// Sets the element's position to the XmlReader's position. /// </summary> private static void SetPosition(XshtdElement element, XmlReader reader) { if (reader is IXmlLineInfo lineInfo) { element.LineNumber = lineInfo.LineNumber; element.ColumnNumber = lineInfo.LinePosition; } }
/// <summary> /// Sets the element's position to the XmlReader's position. /// </summary> static void SetPosition(XshtdElement element, XmlReader reader) { IXmlLineInfo lineInfo = reader as IXmlLineInfo; if (lineInfo != null) { element.LineNumber = lineInfo.LineNumber; element.ColumnNumber = lineInfo.LinePosition; } }