using System;
using System.Collections;
using System.Collections.Generic;
namespace System.Net.NetworkInformation
{
/// Stores a set of types.
// Token: 0x0200015C RID: 348
public class IPAddressCollection : IEnumerable, ICollection, IEnumerable
{
/// Initializes a new instance of the class.
// Token: 0x06000BB1 RID: 2993 RVA: 0x00023DFC File Offset: 0x00021FFC
protected internal IPAddressCollection()
{
}
/// Returns an object that can be used to iterate through this collection.
/// An object that implements the interface and provides access to the types in this collection.
// Token: 0x06000BB2 RID: 2994 RVA: 0x00023E10 File Offset: 0x00022010
IEnumerator IEnumerable.GetEnumerator()
{
return this.list.GetEnumerator();
}
// Token: 0x06000BB3 RID: 2995 RVA: 0x00023E20 File Offset: 0x00022020
internal void SetReadOnly()
{
if (!this.IsReadOnly)
{
this.list = ((List)this.list).AsReadOnly();
}
}
/// Throws a because this operation is not supported for this collection.
/// The object to be added to the collection.
// Token: 0x06000BB4 RID: 2996 RVA: 0x00023E44 File Offset: 0x00022044
public virtual void Add(IPAddress address)
{
if (this.IsReadOnly)
{
throw new NotSupportedException("The collection is read-only.");
}
this.list.Add(address);
}
/// Throws a because this operation is not supported for this collection.
// Token: 0x06000BB5 RID: 2997 RVA: 0x00023E74 File Offset: 0x00022074
public virtual void Clear()
{
if (this.IsReadOnly)
{
throw new NotSupportedException("The collection is read-only.");
}
this.list.Clear();
}
/// Checks whether the collection contains the specified object.
/// true if the object exists in the collection; otherwise, false.
/// The object to be searched in the collection.
// Token: 0x06000BB6 RID: 2998 RVA: 0x00023E98 File Offset: 0x00022098
public virtual bool Contains(IPAddress address)
{
return this.list.Contains(address);
}
/// Copies the elements in this collection to a one-dimensional array of type .
/// A one-dimensional array that receives a copy of the collection.
/// The zero-based index in at which the copy begins.
///
/// is null.
///
/// is less than zero.
///
/// is multidimensional.-or-The number of elements in this is greater than the available space from to the end of the destination .
/// The elements in this cannot be cast automatically to the type of the destination .
// Token: 0x06000BB7 RID: 2999 RVA: 0x00023EA8 File Offset: 0x000220A8
public virtual void CopyTo(IPAddress[] array, int offset)
{
this.list.CopyTo(array, offset);
}
/// Returns an object that can be used to iterate through this collection.
/// An object that implements the interface and provides access to the types in this collection.
// Token: 0x06000BB8 RID: 3000 RVA: 0x00023EB8 File Offset: 0x000220B8
public virtual IEnumerator GetEnumerator()
{
return this.list.GetEnumerator();
}
/// Throws a because this operation is not supported for this collection.
/// Always throws a .
/// The object to be removed.
// Token: 0x06000BB9 RID: 3001 RVA: 0x00023EC8 File Offset: 0x000220C8
public virtual bool Remove(IPAddress address)
{
if (this.IsReadOnly)
{
throw new NotSupportedException("The collection is read-only.");
}
return this.list.Remove(address);
}
/// Gets the number of types in this collection.
/// An value that contains the number of types in this collection.
// Token: 0x170002F0 RID: 752
// (get) Token: 0x06000BBA RID: 3002 RVA: 0x00023EF8 File Offset: 0x000220F8
public virtual int Count
{
get
{
return this.list.Count;
}
}
/// Gets a value that indicates whether access to this collection is read-only.
/// true in all cases.
// Token: 0x170002F1 RID: 753
// (get) Token: 0x06000BBB RID: 3003 RVA: 0x00023F08 File Offset: 0x00022108
public virtual bool IsReadOnly
{
get
{
return this.list.IsReadOnly;
}
}
/// Gets the at the specific index of the collection.
/// The at the specific index in the collection.
/// The index of interest.
// Token: 0x170002F2 RID: 754
public virtual IPAddress this[int index]
{
get
{
return this.list[index];
}
}
// Token: 0x04000B9D RID: 2973
private IList list = new List();
}
}