Author: kostat
Date: 2007-12-27 13:51:37 -0500 (Thu, 27 Dec 2007)
New Revision: 91960
Modified:
trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
trunk/mcs/class/System.Configuration/System.Configuration/KeyValueInternalCollection.cs
trunk/mcs/class/System.Configuration/Test/standalone/t8.cs
Log:
properly override NameValueCollection to support interop with it
Modified: trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
===================================================================
--- trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
2007-12-27 18:30:23 UTC (rev 91959)
+++ trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
2007-12-27 18:51:37 UTC (rev 91960)
@@ -1,5 +1,10 @@
2007-12-25 Konstantin Triger <[EMAIL PROTECTED]>
+ * KeyValueInternalCollection.cs: properly override NameValueCollection
+ to support interop with it.
+
+2007-12-25 Konstantin Triger <[EMAIL PROTECTED]>
+
* ConfigurationElement.cs:
1. typo - pass the correct property to
Attribute.GetCustomAttribute.
2. Pass oroginal exception as inner.
Modified:
trunk/mcs/class/System.Configuration/System.Configuration/KeyValueInternalCollection.cs
===================================================================
---
trunk/mcs/class/System.Configuration/System.Configuration/KeyValueInternalCollection.cs
2007-12-27 18:30:23 UTC (rev 91959)
+++
trunk/mcs/class/System.Configuration/System.Configuration/KeyValueInternalCollection.cs
2007-12-27 18:51:37 UTC (rev 91960)
@@ -41,28 +41,10 @@
public override void Add (string name, string val)
{
- BaseAdd (name, val);
+ Remove (name);
+ base.Add (name, val);
}
- public override void Remove (string name)
- {
- BaseRemove (name);
- }
-
- public override string[] AllKeys {
- get { return BaseGetAllKeys (); }
- }
-
- public override string Get (string name)
- {
- return (string)BaseGet (name);
- }
-
- public override string Get (int index)
- {
- return (string)BaseGet (index);
- }
-
/*
public virtual string Get( int index )
Modified: trunk/mcs/class/System.Configuration/Test/standalone/t8.cs
===================================================================
--- trunk/mcs/class/System.Configuration/Test/standalone/t8.cs 2007-12-27
18:30:23 UTC (rev 91959)
+++ trunk/mcs/class/System.Configuration/Test/standalone/t8.cs 2007-12-27
18:51:37 UTC (rev 91960)
@@ -22,6 +22,7 @@
Console.WriteLine
("ConfigurationManager.AppSettings.Add resulted in exception");
}
+ AppSettings = new NameValueCollection (AppSettings);
foreach (string key in AppSettings.AllKeys) {
Console.WriteLine ("AppSettings[{0}] = {1}",
key, AppSettings[key]);
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches