Merge pull request #3142 from henricm/fix-for-win-mono_string_to_utf8
[mono.git] / mcs / class / System / System.Net.NetworkInformation / IPAddressCollection.cs
index 3900ac1f192f00d9d8d6f91690e8f010644ce870..2b39ff8311c427735dc99ddcab36b62839b8590b 100644 (file)
@@ -33,72 +33,6 @@ using System.Net;
 using System.Runtime.InteropServices;
 
 namespace System.Net.NetworkInformation {
-       public class IPAddressCollection : ICollection<IPAddress>, IEnumerable<IPAddress>, IEnumerable {
-               IList <IPAddress> list = new List<IPAddress> ();
-
-               protected internal IPAddressCollection ()
-               {
-               }
-
-               internal void SetReadOnly ()
-               {
-                       if (!IsReadOnly)
-                               list = ((List<IPAddress>) list).AsReadOnly ();
-               }
-
-               public virtual void Add (IPAddress address)
-               {
-                       if (IsReadOnly)
-                               throw new NotSupportedException ("The collection is read-only.");
-                       list.Add (address);
-               }
-
-               public virtual void Clear ()
-               {
-                       if (IsReadOnly)
-                               throw new NotSupportedException ("The collection is read-only.");
-                       list.Clear ();
-               }
-
-               public virtual bool Contains (IPAddress address)
-               {
-                       return list.Contains (address);
-               }
-
-               public virtual void CopyTo (IPAddress [] array, int offset)
-               {
-                       list.CopyTo (array, offset);
-               }
-
-               public virtual IEnumerator<IPAddress> GetEnumerator ()
-               {
-                       return ((IEnumerable<IPAddress>)list).GetEnumerator ();
-               }
-
-               public virtual bool Remove (IPAddress address)
-               {
-                       if (IsReadOnly)
-                               throw new NotSupportedException ("The collection is read-only.");
-                       return list.Remove (address);
-               }
-
-               IEnumerator IEnumerable.GetEnumerator ()
-               {
-                       return list.GetEnumerator ();
-               }
-
-               public virtual int Count {
-                       get { return list.Count; }
-               }
-
-               public virtual bool IsReadOnly {
-                       get { return list.IsReadOnly; }
-               }
-
-               public virtual IPAddress this [int index] {
-                       get { return list [index]; }
-               }
-       }
 
 #if !MOBILE
        class Win32IPAddressCollection : IPAddressCollection