Merge pull request #364 from directhex/master
[mono.git] / mcs / class / System.Configuration / System.Configuration / AppSettingsSection.cs
index d98fe021ae09168d63a8af6e576ac90dacc60e16..1008a0ae986c214146c513f2320112e183479032 100644 (file)
@@ -64,7 +64,7 @@ namespace System.Configuration {
                        return Settings.IsModified ();
                }
 
-               [MonoTODO ("file path?  do we use a System.Configuration api for opening it?  do we keep it open?  do we open it writable?")]
+               [MonoInternalNote ("file path?  do we use a System.Configuration api for opening it?  do we keep it open?  do we open it writable?")]
                protected internal override void DeserializeElement (XmlReader reader, bool serializeCollectionKey)
                {
                        /* need to do this so we pick up the File attribute */
@@ -73,7 +73,7 @@ namespace System.Configuration {
                        if (File != "") {
                                try {
                                        Stream s = System.IO.File.OpenRead (File);
-                                       XmlReader subreader = new XmlTextReader (s);
+                                       XmlReader subreader = new ConfigXmlTextReader (s, File);
                                        base.DeserializeElement (subreader, serializeCollectionKey);
                                        s.Close ();
                                }
@@ -128,7 +128,8 @@ namespace System.Configuration {
                                col.Add (ele.Key, ele.Value);
                        }
                                
-                       col.SetReadOnly ();
+                       if (!ConfigurationManager.ConfigurationSystem.SupportsUserConfig)
+                               col.SetReadOnly ();
 
                        return col;
                }