Пример #1
0
        /// <summary>
        /// Creates an XmlEntityReference with the specified name.
        /// </summary>
        /// <param name="name">The name of the entity reference.</param>
        /// <returns>The new XmlEntityReference.</returns>
        public override XmlEntityReference CreateEntityReference(string name)
        {
            LineInfoEntityReference ter      = new LineInfoEntityReference(name, this);
            IXmlLineInfo            lineInfo = this.reader as IXmlLineInfo;

            if (lineInfo != null && lineInfo.HasLineInfo())
            {
                ter.SetLineInfo(lineInfo.LineNumber, lineInfo.LinePosition);
            }
            return(ter);
        }
Пример #2
0
 /// <summary>
 /// Creates an XmlEntityReference with the specified name.
 /// </summary>
 /// <param name="name">The name of the entity reference.</param>
 /// <returns>The new XmlEntityReference.</returns>
 public override XmlEntityReference CreateEntityReference(string name)
 {
     LineInfoEntityReference ter = new LineInfoEntityReference(name, this);
     IXmlLineInfo lineInfo = this.reader as IXmlLineInfo;
     if (lineInfo != null && lineInfo.HasLineInfo())
     {
         ter.SetLineInfo(lineInfo.LineNumber, lineInfo.LinePosition);
     }
     return ter;
 }