public static void SuggestLineNo(IXmlLineInfo lie, XmlSourceLineInfo target)
        {
            int atline = lie.LineNumber;

            if (atline > target.LineNumber)
            {
                target.SetLineInfo(lie.LineNumber, lie.LinePosition, null);
            }
        }
        public static void notReadonly(XmlNode node)
        {
            XmlSourceLineInfo lie = node as XmlSourceLineInfo;

            if (node.IsReadOnly)
            {
                unsetReadonly(lie);
            }
        }
        public static XmlNode SetReadOnly(XmlNode node)
        {
            XmlSourceLineInfo lie = node as XmlSourceLineInfo;

            if (node.IsReadOnly)
            {
                lie.ReadOnly = true;
            }
            return(node);
        }
 public void setLineInfo(XmlNode node)
 {
     WasUsed = true;
     CheckNode(node);
     if (LineTracker != null)
     {
         XmlSourceLineInfo nodeL = node as XmlSourceLineInfo;
         if (!SuspendLineInfo && nodeL != null && LineTracker != null)
         {
             nodeL.SetLineInfo(LineTracker.LineNumber, LineTracker.LinePosition, Filename);
         }
     }
     if (node is XmlSourceInfo)
     {
         (node as XmlSourceInfo).ReadOnly = true;
     }
 }
        public void SetParentFromNode(XmlNode xmlNode)
        {
            XmlNode pn = xmlNode.ParentNode;

            if (pn is LineInfoElementImpl)
            {
                lParent = (LineInfoElementImpl)pn;
                XmlDocumentLineInfo.SuggestLineNo(lParent, this);
            }
            if (!(xmlNode is IXmlLineInfo))
            {
                xmlNode = (XmlNode)lParent;
            }
            if (xmlNode is LineInfoElementImpl)
            {
                LineInfoElementImpl lie = (LineInfoElementImpl)xmlNode;
                lineNumData = lie;
                XmlDocumentLineInfo.SuggestLineNo(lie, this);
            }
        }
 internal void SetParent(LineInfoElementImpl pn)
 {
     lParent = pn;
 }
示例#7
0
 internal void SetParent(LineInfoElementImpl pn)
 {
     lParent = pn;
 }
示例#8
0
 public void SetParentFromNode(XmlNode xmlNode)
 {
     XmlNode pn = xmlNode.ParentNode;
     if (pn is LineInfoElementImpl)
     {
         lParent = (LineInfoElementImpl)pn;
         XmlDocumentLineInfo.SuggestLineNo(lParent, this);
     }
     if (!(xmlNode is IXmlLineInfo))
     {
         xmlNode = (XmlNode)lParent;
     }
     if (xmlNode is LineInfoElementImpl)
     {
         LineInfoElementImpl lie = (LineInfoElementImpl)xmlNode;
         lineNumData = lie;
         XmlDocumentLineInfo.SuggestLineNo(lie, this);
     }
 }