134 lines
6.7 KiB
C#
134 lines
6.7 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
|
|
namespace System.Net.NetworkInformation
|
|
{
|
|
/// <summary>Stores a set of <see cref="T:System.Net.NetworkInformation.GatewayIPAddressInformation" /> types.</summary>
|
|
// Token: 0x02000159 RID: 345
|
|
public class GatewayIPAddressInformationCollection : IEnumerable, IEnumerable<GatewayIPAddressInformation>, ICollection<GatewayIPAddressInformation>
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Net.NetworkInformation.GatewayIPAddressInformationCollection" /> class.</summary>
|
|
// Token: 0x06000B9D RID: 2973 RVA: 0x00023B68 File Offset: 0x00021D68
|
|
protected GatewayIPAddressInformationCollection()
|
|
{
|
|
}
|
|
|
|
/// <summary>Returns an object that can be used to iterate through this collection.</summary>
|
|
/// <returns>An object that implements the <see cref="T:System.Collections.IEnumerator" /> interface and provides access to the <see cref="T:System.Net.NetworkInformation.UnicastIPAddressInformation" /> types in this collection.</returns>
|
|
// Token: 0x06000B9E RID: 2974 RVA: 0x00023B7C File Offset: 0x00021D7C
|
|
IEnumerator IEnumerable.GetEnumerator()
|
|
{
|
|
return this.list.GetEnumerator();
|
|
}
|
|
|
|
/// <summary>Throws a <see cref="T:System.NotSupportedException" /> because this operation is not supported for this collection.</summary>
|
|
/// <param name="address">The object to be added to the collection.</param>
|
|
// Token: 0x06000B9F RID: 2975 RVA: 0x00023B90 File Offset: 0x00021D90
|
|
public virtual void Add(GatewayIPAddressInformation address)
|
|
{
|
|
if (this.IsReadOnly)
|
|
{
|
|
throw new NotSupportedException("The collection is read-only.");
|
|
}
|
|
this.list.Add(address);
|
|
}
|
|
|
|
/// <summary>Throws a <see cref="T:System.NotSupportedException" /> because this operation is not supported for this collection.</summary>
|
|
// Token: 0x06000BA0 RID: 2976 RVA: 0x00023BC0 File Offset: 0x00021DC0
|
|
public virtual void Clear()
|
|
{
|
|
if (this.IsReadOnly)
|
|
{
|
|
throw new NotSupportedException("The collection is read-only.");
|
|
}
|
|
this.list.Clear();
|
|
}
|
|
|
|
/// <summary>Checks whether the collection contains the specified <see cref="T:System.Net.NetworkInformation.GatewayIPAddressInformation" /> object.</summary>
|
|
/// <returns>true if the <see cref="T:System.Net.NetworkInformation.GatewayIPAddressInformation" /> object exists in the collection; otherwise false.</returns>
|
|
/// <param name="address">The <see cref="T:System.Net.NetworkInformation.GatewayIPAddressInformation" /> object to be searched in the collection.</param>
|
|
// Token: 0x06000BA1 RID: 2977 RVA: 0x00023BE4 File Offset: 0x00021DE4
|
|
public virtual bool Contains(GatewayIPAddressInformation address)
|
|
{
|
|
return this.list.Contains(address);
|
|
}
|
|
|
|
/// <summary>Copies the elements in this collection to a one-dimensional array of type <see cref="T:System.Net.NetworkInformation.GatewayIPAddressInformation" />.</summary>
|
|
/// <param name="array">A one-dimensional array that receives a copy of the collection.</param>
|
|
/// <param name="offset">The zero-based index in <paramref name="array" /> at which the copy begins.</param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="array" /> is null. </exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="count" /> is less than zero. </exception>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="array" /> is multidimensional.-or- The number of elements in this <see cref="T:System.Net.NetworkInformation.GatewayIPAddressInformation" /> is greater than the available space from <paramref name="count" /> to the end of the destination <paramref name="array" />. </exception>
|
|
/// <exception cref="T:System.InvalidCastException">The elements in this <see cref="T:System.Net.NetworkInformation.GatewayIPAddressInformation" /> cannot be cast automatically to the type of the destination <paramref name="array" />. </exception>
|
|
// Token: 0x06000BA2 RID: 2978 RVA: 0x00023BF4 File Offset: 0x00021DF4
|
|
public virtual void CopyTo(GatewayIPAddressInformation[] array, int offset)
|
|
{
|
|
this.list.CopyTo(array, offset);
|
|
}
|
|
|
|
/// <summary>Returns an object that can be used to iterate through this collection.</summary>
|
|
/// <returns>An object that implements the <see cref="T:System.Collections.IEnumerator" /> interface and provides access to the <see cref="T:System.Net.NetworkInformation.UnicastIPAddressInformation" /> types in this collection.</returns>
|
|
// Token: 0x06000BA3 RID: 2979 RVA: 0x00023C04 File Offset: 0x00021E04
|
|
public virtual IEnumerator<GatewayIPAddressInformation> GetEnumerator()
|
|
{
|
|
return ((IEnumerable<GatewayIPAddressInformation>)this.list).GetEnumerator();
|
|
}
|
|
|
|
/// <summary>Throws a <see cref="T:System.NotSupportedException" /> because this operation is not supported for this collection.</summary>
|
|
/// <returns>Always throws a <see cref="T:System.NotSupportedException" />.</returns>
|
|
/// <param name="address">The object to be removed.</param>
|
|
// Token: 0x06000BA4 RID: 2980 RVA: 0x00023C14 File Offset: 0x00021E14
|
|
public virtual bool Remove(GatewayIPAddressInformation address)
|
|
{
|
|
if (this.IsReadOnly)
|
|
{
|
|
throw new NotSupportedException("The collection is read-only.");
|
|
}
|
|
return this.list.Remove(address);
|
|
}
|
|
|
|
/// <summary>Gets the number of <see cref="T:System.Net.NetworkInformation.GatewayIPAddressInformation" /> types in this collection.</summary>
|
|
/// <returns>An <see cref="T:System.Int32" /> value that contains the number of <see cref="T:System.Net.NetworkInformation.GatewayIPAddressInformation" /> types in this collection.</returns>
|
|
// Token: 0x170002EB RID: 747
|
|
// (get) Token: 0x06000BA5 RID: 2981 RVA: 0x00023C44 File Offset: 0x00021E44
|
|
public virtual int Count
|
|
{
|
|
get
|
|
{
|
|
return this.list.Count;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets a value that indicates whether access to this collection is read-only.</summary>
|
|
/// <returns>true in all cases.</returns>
|
|
// Token: 0x170002EC RID: 748
|
|
// (get) Token: 0x06000BA6 RID: 2982 RVA: 0x00023C54 File Offset: 0x00021E54
|
|
public virtual bool IsReadOnly
|
|
{
|
|
get
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the <see cref="T:System.Net.NetworkInformation.GatewayIPAddressInformation" /> at the specific index of the collection.</summary>
|
|
/// <returns>The <see cref="T:System.Net.NetworkInformation.GatewayIPAddressInformation" /> at the specific index in the collection.</returns>
|
|
/// <param name="index">The index of interest.</param>
|
|
// Token: 0x170002ED RID: 749
|
|
public virtual GatewayIPAddressInformation this[int index]
|
|
{
|
|
get
|
|
{
|
|
return this.list[index];
|
|
}
|
|
}
|
|
|
|
// Token: 0x04000B98 RID: 2968
|
|
private List<GatewayIPAddressInformation> list = new List<GatewayIPAddressInformation>();
|
|
}
|
|
}
|