134 lines
6.8 KiB
C#
134 lines
6.8 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.MulticastIPAddressInformation" /> types.</summary>
|
|
// Token: 0x0200019B RID: 411
|
|
public class MulticastIPAddressInformationCollection : IEnumerable, IEnumerable<MulticastIPAddressInformation>, ICollection<MulticastIPAddressInformation>
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Net.NetworkInformation.MulticastIPAddressInformationCollection" /> class.</summary>
|
|
// Token: 0x06000DC5 RID: 3525 RVA: 0x00026B3C File Offset: 0x00024D3C
|
|
protected internal MulticastIPAddressInformationCollection()
|
|
{
|
|
}
|
|
|
|
/// <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: 0x06000DC6 RID: 3526 RVA: 0x00026B50 File Offset: 0x00024D50
|
|
IEnumerator IEnumerable.GetEnumerator()
|
|
{
|
|
return this.list.GetEnumerator();
|
|
}
|
|
|
|
/// <summary>Throws a <see cref="T:System.NotSupportedException" /> because the collection is read-only and elements cannot be added to the collection.</summary>
|
|
/// <param name="address">The object to be added to the collection.</param>
|
|
// Token: 0x06000DC7 RID: 3527 RVA: 0x00026B64 File Offset: 0x00024D64
|
|
public virtual void Add(MulticastIPAddressInformation 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 the collection is read-only and elements cannot be removed.</summary>
|
|
// Token: 0x06000DC8 RID: 3528 RVA: 0x00026B94 File Offset: 0x00024D94
|
|
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.MulticastIPAddressInformation" /> object.</summary>
|
|
/// <returns>true if the <see cref="T:System.Net.NetworkInformation.MulticastIPAddressInformation" /> object exists in the collection; otherwise, false.</returns>
|
|
/// <param name="address">The <see cref="T:System.Net.NetworkInformation.MulticastIPAddressInformation" /> object to be searched in the collection.</param>
|
|
// Token: 0x06000DC9 RID: 3529 RVA: 0x00026BB8 File Offset: 0x00024DB8
|
|
public virtual bool Contains(MulticastIPAddressInformation 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.MulticastIPAddressInformation" />.</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.MulticastIPAddressInformation" /> 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.MulticastIPAddressInformation" /> cannot be cast automatically to the type of the destination <paramref name="array" />. </exception>
|
|
// Token: 0x06000DCA RID: 3530 RVA: 0x00026BC8 File Offset: 0x00024DC8
|
|
public virtual void CopyTo(MulticastIPAddressInformation[] 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: 0x06000DCB RID: 3531 RVA: 0x00026BD8 File Offset: 0x00024DD8
|
|
public virtual IEnumerator<MulticastIPAddressInformation> GetEnumerator()
|
|
{
|
|
return ((IEnumerable<MulticastIPAddressInformation>)this.list).GetEnumerator();
|
|
}
|
|
|
|
/// <summary>Throws a <see cref="T:System.NotSupportedException" /> because the collection is read-only and elements cannot be removed.</summary>
|
|
/// <returns>Always throws a <see cref="T:System.NotSupportedException" />.</returns>
|
|
/// <param name="address">The object to be removed.</param>
|
|
// Token: 0x06000DCC RID: 3532 RVA: 0x00026BE8 File Offset: 0x00024DE8
|
|
public virtual bool Remove(MulticastIPAddressInformation 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.MulticastIPAddressInformation" /> types in this collection.</summary>
|
|
/// <returns>An <see cref="T:System.Int32" /> value that contains the number of <see cref="T:System.Net.NetworkInformation.MulticastIPAddressInformation" /> types in this collection.</returns>
|
|
// Token: 0x1700047D RID: 1149
|
|
// (get) Token: 0x06000DCD RID: 3533 RVA: 0x00026C18 File Offset: 0x00024E18
|
|
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: 0x1700047E RID: 1150
|
|
// (get) Token: 0x06000DCE RID: 3534 RVA: 0x00026C28 File Offset: 0x00024E28
|
|
public virtual bool IsReadOnly
|
|
{
|
|
get
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the <see cref="T:System.Net.NetworkInformation.MulticastIPAddressInformation" /> at the specific index of the collection.</summary>
|
|
/// <returns>The <see cref="T:System.Net.NetworkInformation.MulticastIPAddressInformation" /> at the specific index in the collection.</returns>
|
|
/// <param name="index">The index of interest.</param>
|
|
// Token: 0x1700047F RID: 1151
|
|
public virtual MulticastIPAddressInformation this[int index]
|
|
{
|
|
get
|
|
{
|
|
return this.list[index];
|
|
}
|
|
}
|
|
|
|
// Token: 0x04000C80 RID: 3200
|
|
private List<MulticastIPAddressInformation> list = new List<MulticastIPAddressInformation>();
|
|
}
|
|
}
|