private void LoadFromFileName(string filename)
        {
            this._fileName = filename;
            StreamReader streamReader = (StreamReader)null;

            try
            {
                if (this.PreserveWhitespace)
                {
                    this._preservationProvider = new XmlAttributePreservationProvider(filename);
                }
                streamReader = new StreamReader(filename, true);
                this.LoadFromTextReader((TextReader)streamReader);
            }
            finally
            {
                if (this._preservationProvider != null)
                {
                    this._preservationProvider.Close();
                    this._preservationProvider = (XmlAttributePreservationProvider)null;
                }
                if (streamReader != null)
                {
                    streamReader.Close();
                    streamReader.Dispose();
                }
            }
        }
 private void LoadFromFileName(string filename)
 {
     this._fileName = filename;
     StreamReader streamReader = (StreamReader)null;
     try
     {
         if (this.PreserveWhitespace)
             this._preservationProvider = new XmlAttributePreservationProvider(filename);
         streamReader = new StreamReader(filename, true);
         this.LoadFromTextReader((TextReader)streamReader);
     }
     finally
     {
         if (this._preservationProvider != null)
         {
             this._preservationProvider.Close();
             this._preservationProvider = (XmlAttributePreservationProvider)null;
         }
         if (streamReader != null)
         {
             streamReader.Close();
             streamReader.Dispose();
         }
     }
 }