Esempio n. 1
0
 /// <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;
     }
 }
Esempio n. 2
0
        /// <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;
            }
        }