Esempio n. 1
0
 /// <summary>
 /// Creates an XmlComment containing the specified data.
 /// </summary>
 /// <param name="data">The content of the new XmlComment.</param>
 /// <returns>The new XmlComment.</returns>
 public override XmlComment CreateComment(string data)
 {
     LineInfoComment tc = new LineInfoComment(data, this);
     IXmlLineInfo lineInfo = this.reader as IXmlLineInfo;
     if (lineInfo != null && lineInfo.HasLineInfo())
     {
         tc.SetLineInfo(lineInfo.LineNumber, lineInfo.LinePosition);
     }
     return tc;
 }
Esempio n. 2
0
        /// <summary>
        /// Creates an XmlComment containing the specified data.
        /// </summary>
        /// <param name="data">The content of the new XmlComment.</param>
        /// <returns>The new XmlComment.</returns>
        public override XmlComment CreateComment(string data)
        {
            LineInfoComment tc       = new LineInfoComment(data, this);
            IXmlLineInfo    lineInfo = this.reader as IXmlLineInfo;

            if (lineInfo != null && lineInfo.HasLineInfo())
            {
                tc.SetLineInfo(lineInfo.LineNumber, lineInfo.LinePosition);
            }
            return(tc);
        }