Author: kostat
Date: 2007-01-16 07:21:52 -0500 (Tue, 16 Jan 2007)
New Revision: 71124
Modified:
trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
trunk/mcs/class/System.Configuration/System.Configuration/ConfigurationElement.cs
trunk/mcs/class/System.Configuration/Test/standalone/t42.cs
trunk/mcs/class/System.Configuration/Test/standalone/t42.exe.config
trunk/mcs/class/System.Configuration/Test/standalone/t42.exe.expected
Log:
ignore properties with null or empty name
Modified: trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
===================================================================
--- trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
2007-01-16 12:19:26 UTC (rev 71123)
+++ trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
2007-01-16 12:21:52 UTC (rev 71124)
@@ -1,5 +1,9 @@
2007-01-16 Konstantin Triger <[EMAIL PROTECTED]>
+ * ConfigurationElement.cs: ignore properties with null or empty name.
+
+2007-01-16 Konstantin Triger <[EMAIL PROTECTED]>
+
* ConfigurationElement.cs: Try to deserilalize an unrecognized element
by
current element, and only if failed delegate to default
collection.
Modified:
trunk/mcs/class/System.Configuration/System.Configuration/ConfigurationElement.cs
===================================================================
---
trunk/mcs/class/System.Configuration/System.Configuration/ConfigurationElement.cs
2007-01-16 12:19:26 UTC (rev 71123)
+++
trunk/mcs/class/System.Configuration/System.Configuration/ConfigurationElement.cs
2007-01-16 12:21:52 UTC (rev 71124)
@@ -366,7 +366,7 @@
modified = false;
foreach (PropertyInformation prop in
ElementInformation.Properties)
- if (prop.IsRequired && !readProps.ContainsKey
(prop)) {
+ if (!String.IsNullOrEmpty(prop.Name) &&
prop.IsRequired && !readProps.ContainsKey (prop)) {
object val = OnRequiredPropertyNotFound
(prop.Name);
if (!object.Equals (val,
prop.DefaultValue)) {
prop.Value = val;
Modified: trunk/mcs/class/System.Configuration/Test/standalone/t42.cs
===================================================================
--- trunk/mcs/class/System.Configuration/Test/standalone/t42.cs 2007-01-16
12:19:26 UTC (rev 71123)
+++ trunk/mcs/class/System.Configuration/Test/standalone/t42.cs 2007-01-16
12:21:52 UTC (rev 71124)
@@ -91,7 +91,7 @@
internal set { base ["name"] = value; }
}
- [ConfigurationProperty ("", IsDefaultCollection = true)]
+ [ConfigurationProperty ("", IsDefaultCollection = true,
IsRequired = true)]
[ConfigurationCollection (typeof (UrlsCollection))]
public UrlsCollection PropertySettings {
get { return (UrlsCollection) base [String.Empty]; }
Modified: trunk/mcs/class/System.Configuration/Test/standalone/t42.exe.config
===================================================================
--- trunk/mcs/class/System.Configuration/Test/standalone/t42.exe.config
2007-01-16 12:19:26 UTC (rev 71123)
+++ trunk/mcs/class/System.Configuration/Test/standalone/t42.exe.config
2007-01-16 12:21:52 UTC (rev 71124)
@@ -14,9 +14,11 @@
<add name1="Microsoft3" url="http://www.microsoft.com" port="0" />
<add name1="Microsoft5" url="http://www.microsoft.com" port="0" />
</group>
+ <group name="ff2">
+ </group>
<add name1="Microsoft1" url="http://www.microsoft.com" port="0" />
<add name1="Microsoft6" url="http://www.microsoft.com" port="0" />
<remove name1="Microsoft1"/>
</urls>
</MyUrls>
-</configuration>
\ No newline at end of file
+</configuration>
Modified: trunk/mcs/class/System.Configuration/Test/standalone/t42.exe.expected
===================================================================
--- trunk/mcs/class/System.Configuration/Test/standalone/t42.exe.expected
2007-01-16 12:19:26 UTC (rev 71123)
+++ trunk/mcs/class/System.Configuration/Test/standalone/t42.exe.expected
2007-01-16 12:21:52 UTC (rev 71124)
@@ -6,3 +6,4 @@
Group name: ff1
#0 Microsoft3: http://www.microsoft.com port 0
#1 Microsoft5: http://www.microsoft.com port 0
+Group name: ff2
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches