Author: atsushi
Date: 2007-11-21 14:53:26 -0500 (Wed, 21 Nov 2007)
New Revision: 90108
Modified:
trunk/mcs/class/System/System.Configuration/ChangeLog
trunk/mcs/class/System/System.Configuration/CustomizableFileSettingsProvider.cs
Log:
2007-11-21 Atsushi Enomoto <[EMAIL PROTECTED]>
* CustomizableFileSettingsProvider.cs : when a property is found
only in the config file and not in the corresponding config type,
do not raise NRE but just add it as a simple property value.
Fixed bug #343459.
Modified: trunk/mcs/class/System/System.Configuration/ChangeLog
===================================================================
--- trunk/mcs/class/System/System.Configuration/ChangeLog 2007-11-21
19:35:02 UTC (rev 90107)
+++ trunk/mcs/class/System/System.Configuration/ChangeLog 2007-11-21
19:53:26 UTC (rev 90108)
@@ -1,3 +1,10 @@
+2007-11-21 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * CustomizableFileSettingsProvider.cs : when a property is found
+ only in the config file and not in the corresponding config type,
+ do not raise NRE but just add it as a simple property value.
+ Fixed bug #343459.
+
2007-11-13 Atsushi Enomoto <[EMAIL PROTECTED]>
* ConfigXmlDocument.cs : corcompare cleanup.
Modified:
trunk/mcs/class/System/System.Configuration/CustomizableFileSettingsProvider.cs
===================================================================
---
trunk/mcs/class/System/System.Configuration/CustomizableFileSettingsProvider.cs
2007-11-21 19:35:02 UTC (rev 90107)
+++
trunk/mcs/class/System/System.Configuration/CustomizableFileSettingsProvider.cs
2007-11-21 19:53:26 UTC (rev 90108)
@@ -648,6 +648,11 @@
private void LoadPropertyValue (SettingsPropertyCollection
collection, SettingElement element, bool allowOverwrite)
{
SettingsProperty prop = collection [element.Name];
+ if (prop == null) { // see bug #343459
+ prop = new SettingsProperty (element.Name);
+ collection.Add (prop);
+ }
+
SettingsPropertyValue value = new SettingsPropertyValue
(prop);
value.IsDirty = false;
value.SerializedValue = element.Value.ValueXml != null
? element.Value.ValueXml.InnerText : prop.DefaultValue;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches