Author: toshok
Date: 2006-01-09 17:09:19 -0500 (Mon, 09 Jan 2006)
New Revision: 55266
Modified:
trunk/mcs/class/System.Configuration/System.Configuration/AppSettingsSection.cs
trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
trunk/mcs/class/System.Configuration/System.Configuration/ConfigurationManager.cs
Log:
2006-01-09 Chris Toshok <[EMAIL PROTECTED]>
* ConfigurationManager.cs (AppSettings): just return
AppSettingsSection.GetRuntimeObject() here.
* AppSettingsSection.cs: fix the "file" property to match dumper
output.
(GetRuntimeObject): this returns a KeyValueInternalCollection in
MS's implementation.
Modified:
trunk/mcs/class/System.Configuration/System.Configuration/AppSettingsSection.cs
===================================================================
---
trunk/mcs/class/System.Configuration/System.Configuration/AppSettingsSection.cs
2006-01-09 22:01:29 UTC (rev 55265)
+++
trunk/mcs/class/System.Configuration/System.Configuration/AppSettingsSection.cs
2006-01-09 22:09:19 UTC (rev 55266)
@@ -29,6 +29,7 @@
#if NET_2_0
using System;
+using System.ComponentModel;
using System.Collections.Specialized;
using System.Xml;
using System.IO;
@@ -44,7 +45,7 @@
static AppSettingsSection ()
{
_propFile = new ConfigurationProperty ("file",
typeof(string), "",
- null, null,
ConfigurationPropertyOptions.None);
+ new
StringConverter(), null, ConfigurationPropertyOptions.None);
_propSettings = new ConfigurationProperty ("",
typeof(KeyValueConfigurationCollection), null,
null, null,
ConfigurationPropertyOptions.IsDefaultCollection);
@@ -118,10 +119,17 @@
}
}
- [MonoTODO]
protected internal override object GetRuntimeObject ()
{
- return base.GetRuntimeObject();
+ KeyValueInternalCollection col = new
KeyValueInternalCollection ();
+
+ foreach (string key in Settings.AllKeys) {
+ col.Add (Settings[key].Key,
Settings[key].Value);
+ }
+
+ col.SetReadOnly ();
+
+ return col;
}
}
}
Modified: trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
===================================================================
--- trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
2006-01-09 22:01:29 UTC (rev 55265)
+++ trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
2006-01-09 22:09:19 UTC (rev 55266)
@@ -1,5 +1,15 @@
2006-01-09 Chris Toshok <[EMAIL PROTECTED]>
+ * ConfigurationManager.cs (AppSettings): just return
+ AppSettingsSection.GetRuntimeObject() here.
+
+ * AppSettingsSection.cs: fix the "file" property to match dumper
+ output.
+ (GetRuntimeObject): this returns a KeyValueInternalCollection in
+ MS's implementation.
+
+2006-01-09 Chris Toshok <[EMAIL PROTECTED]>
+
* ElementInformation.cs (Validator): if propertyInfo == null,
return a DefaultValidator instance.
Modified:
trunk/mcs/class/System.Configuration/System.Configuration/ConfigurationManager.cs
===================================================================
---
trunk/mcs/class/System.Configuration/System.Configuration/ConfigurationManager.cs
2006-01-09 22:01:29 UTC (rev 55265)
+++
trunk/mcs/class/System.Configuration/System.Configuration/ConfigurationManager.cs
2006-01-09 22:09:19 UTC (rev 55266)
@@ -167,15 +167,7 @@
public static NameValueCollection AppSettings {
get {
AppSettingsSection appsettings =
(AppSettingsSection) GetSection ("appSettings");
- KeyValueInternalCollection col = new
KeyValueInternalCollection ();
-
- foreach (string key in
appsettings.Settings.AllKeys) {
- col.Add (appsettings.Settings[key].Key,
appsettings.Settings[key].Value);
- }
-
- col.SetReadOnly ();
-
- return col;
+ return
(NameValueCollection)appsettings.GetRuntimeObject ();
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches