You've already forked linux-packaging-mono
Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
parent
a569aebcfd
commit
e79aa3c0ed
@ -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
|
||||
|
Reference in New Issue
Block a user