2008-06-05 Ivan N. Zlatev <contact@i-nz.net>
authorIvan Zlatev <ivan@ivanz.com>
Fri, 5 Jun 2009 18:37:42 +0000 (18:37 -0000)
committerIvan Zlatev <ivan@ivanz.com>
Fri, 5 Jun 2009 18:37:42 +0000 (18:37 -0000)
* ContextStack.cs: Also check for subclasses in the Type-based
indexter property.
[Fixes bug #509151]

svn path=/trunk/mcs/; revision=135546

mcs/class/System/System.ComponentModel.Design.Serialization/ChangeLog [changed mode: 0644->0755]
mcs/class/System/System.ComponentModel.Design.Serialization/ContextStack.cs [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 7ab4293..3f705c8
@@ -1,3 +1,9 @@
+2008-06-05  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * ContextStack.cs: Also check for subclasses in the Type-based
+       indexter property.
+       [Fixes bug #509151]
+
 2007-11-13  Atsushi Enomoto  <atsushi@ximian.com>
 
        * ResolveNameEventHandler.cs, RootDesignerSerializerAttribute.cs,
old mode 100644 (file)
new mode 100755 (executable)
index e7b0dd9..132e284
@@ -57,7 +57,7 @@ namespace System.ComponentModel.Design.Serialization
                public object this[Type type] {
                        get {
                                for (int i = _contextList.Count - 1; i >= 0; i--)
-                                       if (_contextList[i].GetType () == type)
+                                       if (type.IsInstanceOfType (_contextList[i]))
                                                return _contextList[i];
                                return null;
                        }