internal XmlFileInfoElement(string prefix, string localName, string namespaceUri, XmlFileInfoDocument document)
     : base(prefix, localName, namespaceUri, (XmlDocument)document)
 {
     this.lineNumber   = document.CurrentLineNumber;
     this.linePosition = document.CurrentLinePosition;
     this.isOriginal   = document.FirstLoad;
     if (document.PreservationProvider != null)
     {
         this.preservationDict = document.PreservationProvider.GetDictAtPosition(this.lineNumber, this.linePosition - 1);
     }
     if (this.preservationDict != null)
     {
         return;
     }
     this.preservationDict = new XmlAttributePreservationDict();
 }
Esempio n. 2
0
 public XmlAttributePreservationDict GetDictAtPosition(int lineNumber, int linePosition)
 {
     if (this.reader.ReadToPosition(lineNumber, linePosition))
     {
         StringBuilder stringBuilder = new StringBuilder();
         int           num;
         do
         {
             num = this.reader.Read();
             stringBuilder.Append((char)num);
         }while (num > 0 && (int)(ushort)num != 62);
         if (num > 0)
         {
             XmlAttributePreservationDict preservationDict = new XmlAttributePreservationDict();
             preservationDict.ReadPreservationInfo(((object)stringBuilder).ToString());
             return(preservationDict);
         }
     }
     return((XmlAttributePreservationDict)null);
 }
 public XmlAttributePreservationDict GetDictAtPosition(int lineNumber, int linePosition)
 {
     if (this.reader.ReadToPosition(lineNumber, linePosition))
     {
         StringBuilder stringBuilder = new StringBuilder();
         int num;
         do
         {
             num = this.reader.Read();
             stringBuilder.Append((char)num);
         }
         while (num > 0 && (int)(ushort)num != 62);
         if (num > 0)
         {
             XmlAttributePreservationDict preservationDict = new XmlAttributePreservationDict();
             preservationDict.ReadPreservationInfo(((object)stringBuilder).ToString());
             return preservationDict;
         }
     }
     return (XmlAttributePreservationDict)null;
 }
 internal XmlFileInfoElement(string prefix, string localName, string namespaceUri, XmlFileInfoDocument document)
     : base(prefix, localName, namespaceUri, (XmlDocument)document)
 {
     this.lineNumber = document.CurrentLineNumber;
     this.linePosition = document.CurrentLinePosition;
     this.isOriginal = document.FirstLoad;
     if (document.PreservationProvider != null)
         this.preservationDict = document.PreservationProvider.GetDictAtPosition(this.lineNumber, this.linePosition - 1);
     if (this.preservationDict != null)
         return;
     this.preservationDict = new XmlAttributePreservationDict();
 }