* TypeConverter.cs: Added explicit interface implementation for
authorGert Driesen <drieseng@users.sourceforge.net>
Wed, 31 May 2006 13:20:33 +0000 (13:20 -0000)
committerGert Driesen <drieseng@users.sourceforge.net>
Wed, 31 May 2006 13:20:33 +0000 (13:20 -0000)
ICollection.CopyTo and IEnumerable.GetEnumerator. Fixes corcompare
warnings.
* Component.cs: Remove TypeConverter attribute. Fixes corcompare
warning.
* AttributeCollection.cs: Added explicit interface implemenation for
IEnumerable.GetEnumerator, IList.RemoveAt and ICollection.Count.
Fixes corcompare warnings.
* PropertyDescriptorCollection.cs: Added explicit interface
implemenation for ICollection.Count. Fixes corcompare warning.

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

mcs/class/System/System.ComponentModel/AttributeCollection.cs
mcs/class/System/System.ComponentModel/ChangeLog
mcs/class/System/System.ComponentModel/Component.cs
mcs/class/System/System.ComponentModel/EventDescriptorCollection.cs
mcs/class/System/System.ComponentModel/PropertyDescriptorCollection.cs
mcs/class/System/System.ComponentModel/TypeConverter.cs

index 658117ac1af0982a8042209ee40985fa39bad2e7..ed36edd9fea6a3745ce4fd2e3dd7296aeef4543a 100644 (file)
@@ -37,7 +37,7 @@ using System.Runtime.InteropServices;
 namespace System.ComponentModel
 {
        [ComVisible (true)]
-       public class AttributeCollection : ICollection, IEnumerable
+       public class AttributeCollection : ICollection
        {
                private ArrayList attrList = new ArrayList ();
                public static readonly AttributeCollection Empty = new AttributeCollection ((ArrayList)null);
@@ -80,6 +80,10 @@ namespace System.ComponentModel
                        attrList.CopyTo (array, index);
                }
 
+               IEnumerator IEnumerable.GetEnumerator () {
+                       return GetEnumerator ();
+               }
+
                public IEnumerator GetEnumerator ()
                {
                        return attrList.GetEnumerator ();
@@ -132,6 +136,12 @@ namespace System.ComponentModel
                        }
                }
                
+               int ICollection.Count {
+                       get {
+                               return Count;
+                       }
+               }
+
                public int Count {
                        get {
                                return attrList.Count;
index 0ebe54b43c31573d607e325fda43bf958a504258..ec0459c34cce71971fd8bdb253cf58357cfecfe4 100644 (file)
@@ -1,3 +1,16 @@
+2006-05-31  Gert Driesen  <drieseng@users.sourceforge.net>
+
+       * TypeConverter.cs: Added explicit interface implementation for
+       ICollection.CopyTo and IEnumerable.GetEnumerator. Fixes corcompare
+       warnings.
+       * Component.cs: Remove TypeConverter attribute. Fixes corcompare
+       warning.
+       * AttributeCollection.cs: Added explicit interface implemenation for
+       IEnumerable.GetEnumerator, IList.RemoveAt and ICollection.Count.
+       Fixes corcompare warnings.
+       * PropertyDescriptorCollection.cs: Added explicit interface
+       implemenation for ICollection.Count. Fixes corcompare warning.
+
 2006-05-22  Atsushi Enomoto  <atsushi@ximian.com>
 
        * TypeDescriptor.cs : GetProperties() does not return indexers.
index a3871b3c20b62bd38f33c6ce0fc021eece36add3..e370a6aa6834ae328c4237904f1ffb104f5e3012 100644 (file)
@@ -36,7 +36,6 @@ using System.ComponentModel;
 namespace System.ComponentModel {
 
        [DesignerCategory ("Component")]
-       [TypeConverter(typeof(ComponentConverter))]
        public class Component : MarshalByRefObject, IComponent, IDisposable
        {
 
index 9b3fbaf93de50f3a0d1469d0d4e8b5d32502019c..3c61fe50f0e25f905bfd3b37b45137406dfe49cc 100644 (file)
@@ -64,6 +64,10 @@ namespace System.ComponentModel
                        return eventList.Add (value);
                }
 
+               void IList.Clear () {
+                       Clear ();
+               }
+
                public void Clear () {
                        eventList.Clear ();
                }
@@ -81,6 +85,10 @@ namespace System.ComponentModel
                        return null;
                }
 
+               IEnumerator IEnumerable.GetEnumerator () {
+                       return GetEnumerator ();
+               }
+
                public IEnumerator GetEnumerator () {
                        return eventList.GetEnumerator ();
                }
@@ -97,6 +105,10 @@ namespace System.ComponentModel
                        eventList.Remove (value);
                }
 
+               void IList.RemoveAt (int index) {
+                       RemoveAt (index);
+               }
+
                public void RemoveAt (int index) {
                        eventList.RemoveAt (index);
                }
@@ -176,6 +188,10 @@ namespace System.ComponentModel
                        return col;
                }
                
+               int ICollection.Count {
+                       get { return Count; }
+               }
+
                public int Count {
                        get {
                                return eventList.Count;
index 7c3e3fa2dd930fa7c283d6cbbcb40c6b4ac93b12..3b1aa926d44f079b7fe7f52665942212eee30780 100644 (file)
@@ -334,6 +334,10 @@ namespace System.ComponentModel
                        }
                }
 
+               int ICollection.Count {
+                       get { return Count; }
+               }
+
                public int Count
                {
                        get {
index aad81d86c4356ad3f5b288bf5389232d6989f16b..f0e605098f11c9261465dbafa167e75d029d2df2 100644 (file)
@@ -265,11 +265,19 @@ namespace System.ComponentModel
                                this.values = values;
                        }
 
+                       void ICollection.CopyTo (Array array, int index) {
+                               CopyTo (array, index);
+                       }
+
                        public void CopyTo (Array array, int index)
                        {
                                values.CopyTo (array, index);
                        }
 
+                       IEnumerator IEnumerable.GetEnumerator () {
+                               return GetEnumerator ();
+                       }
+
                        public IEnumerator GetEnumerator ()
                        {
                                return values.GetEnumerator ();