Author: kostat
Date: 2007-01-18 07:42:24 -0500 (Thu, 18 Jan 2007)
New Revision: 71255
Modified:
branches/mainsoft/gh20preview2/mcs/class/System/System.Collections.Specialized/ChangeLog
branches/mainsoft/gh20preview2/mcs/class/System/System.Collections.Specialized/OrderedDictionary.cs
branches/mainsoft/gh20preview2/mcs/class/System/Test/System.Collections.Specialized/OrderedDictionaryTest.cs
Log:
merge -r 71253:71254
Modified:
branches/mainsoft/gh20preview2/mcs/class/System/System.Collections.Specialized/ChangeLog
===================================================================
---
branches/mainsoft/gh20preview2/mcs/class/System/System.Collections.Specialized/ChangeLog
2007-01-18 12:41:05 UTC (rev 71254)
+++
branches/mainsoft/gh20preview2/mcs/class/System/System.Collections.Specialized/ChangeLog
2007-01-18 12:42:24 UTC (rev 71255)
@@ -1,3 +1,7 @@
+2007-01-18 Konstantin Triger <[EMAIL PROTECTED]>
+
+ * OrderedDictionary.cs: use IEqualityComparer for key comparison.
+
2006-10-03 Andrew Skiba <[EMAIL PROTECTED]>
* ListDictionary.cs: remove unnecessary out parameter
Modified:
branches/mainsoft/gh20preview2/mcs/class/System/System.Collections.Specialized/OrderedDictionary.cs
===================================================================
---
branches/mainsoft/gh20preview2/mcs/class/System/System.Collections.Specialized/OrderedDictionary.cs
2007-01-18 12:41:05 UTC (rev 71254)
+++
branches/mainsoft/gh20preview2/mcs/class/System/System.Collections.Specialized/OrderedDictionary.cs
2007-01-18 12:42:24 UTC (rev 71255)
@@ -238,7 +238,7 @@
{
for (int n=0; n<list.Count; n++) {
DictionaryEntry de = (DictionaryEntry) list [n];
- if (de.Key.Equals (key))
+ if (comparer != null ? comparer.Equals(de.Key,
key) : de.Key.Equals(key))
return n;
}
return -1;
Modified:
branches/mainsoft/gh20preview2/mcs/class/System/Test/System.Collections.Specialized/OrderedDictionaryTest.cs
===================================================================
---
branches/mainsoft/gh20preview2/mcs/class/System/Test/System.Collections.Specialized/OrderedDictionaryTest.cs
2007-01-18 12:41:05 UTC (rev 71254)
+++
branches/mainsoft/gh20preview2/mcs/class/System/Test/System.Collections.Specialized/OrderedDictionaryTest.cs
2007-01-18 12:42:24 UTC (rev 71255)
@@ -121,6 +121,15 @@
}
[Test]
+ public void Constructor_NoCase_IEqualityComparer ()
+ {
+ OrderedDictionary od = new OrderedDictionary
(StringComparer.InvariantCultureIgnoreCase);
+ od ["Original_PhotoID"] = null;
+ od ["original_PhotoID"] = 12;
+ Assert.AreEqual (1, od.Count);
+ }
+
+ [Test]
// [ExpectedException (typeof (ArgumentOutOfRangeException))]
public void Constructor_IntNegative_IEqualityComparer ()
{
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches