Author: lluis
Date: 2005-04-22 07:43:19 -0400 (Fri, 22 Apr 2005)
New Revision: 43438

Modified:
   trunk/mcs/class/System/System.ComponentModel/AttributeCollection.cs
   trunk/mcs/class/System/System.ComponentModel/ChangeLog
Log:
2005-04-22  LLuis Sanchez Gual  <[EMAIL PROTECTED]>

        * AttributeCollection.cs: When checking if the list contains an
        attribute, always return true if that attribute is the default
        attribute for that kind of attributes.



Modified: trunk/mcs/class/System/System.ComponentModel/AttributeCollection.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel/AttributeCollection.cs 
2005-04-22 11:29:24 UTC (rev 43437)
+++ trunk/mcs/class/System/System.ComponentModel/AttributeCollection.cs 
2005-04-22 11:43:19 UTC (rev 43438)
@@ -56,7 +56,11 @@
 
                public bool Contains (Attribute attr)
                {
-                       return attrList.Contains (attr);
+                       Attribute at = this [attr.GetType ()];
+                       if (at != null)
+                               return attr.Equals (at);
+                       else
+                               return false;
                }
 
                public bool Contains (Attribute [] attributes)

Modified: trunk/mcs/class/System/System.ComponentModel/ChangeLog
===================================================================
--- trunk/mcs/class/System/System.ComponentModel/ChangeLog      2005-04-22 
11:29:24 UTC (rev 43437)
+++ trunk/mcs/class/System/System.ComponentModel/ChangeLog      2005-04-22 
11:43:19 UTC (rev 43438)
@@ -1,3 +1,9 @@
+2005-04-22  LLuis Sanchez Gual  <[EMAIL PROTECTED]>
+
+       * AttributeCollection.cs: When checking if the list contains an
+       attribute, always return true if that attribute is the default
+       attribute for that kind of attributes.
+
 2005-04-13  LLuis Sanchez Gual  <[EMAIL PROTECTED]>
 
        * TypeDescriptor.cs: When creating a converter, use a constructor that

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to