Files
Dec2017-Script-Dump/System/Net/NetworkInformation/Win32GatewayIPAddressInformationCollection.cs
2026-06-04 11:42:34 +02:00

58 lines
1.8 KiB
C#

using System;
using System.Runtime.InteropServices;
namespace System.Net.NetworkInformation
{
// Token: 0x0200015A RID: 346
internal class Win32GatewayIPAddressInformationCollection : GatewayIPAddressInformationCollection
{
// Token: 0x06000BA8 RID: 2984 RVA: 0x00023C68 File Offset: 0x00021E68
private Win32GatewayIPAddressInformationCollection(bool isReadOnly)
{
this.is_readonly = isReadOnly;
}
// Token: 0x06000BA9 RID: 2985 RVA: 0x00023C78 File Offset: 0x00021E78
public Win32GatewayIPAddressInformationCollection(params Win32_IP_ADDR_STRING[] al)
{
foreach (Win32_IP_ADDR_STRING win32_IP_ADDR_STRING in al)
{
if (!string.IsNullOrEmpty(win32_IP_ADDR_STRING.IpAddress))
{
this.Add(new GatewayIPAddressInformationImpl(IPAddress.Parse(win32_IP_ADDR_STRING.IpAddress)));
this.AddSubsequently(win32_IP_ADDR_STRING.Next);
}
}
this.is_readonly = true;
}
// Token: 0x06000BAB RID: 2987 RVA: 0x00023D00 File Offset: 0x00021F00
private void AddSubsequently(IntPtr head)
{
IntPtr intPtr = head;
while (intPtr != IntPtr.Zero)
{
Win32_IP_ADDR_STRING win32_IP_ADDR_STRING = (Win32_IP_ADDR_STRING)Marshal.PtrToStructure(intPtr, typeof(Win32_IP_ADDR_STRING));
this.Add(new GatewayIPAddressInformationImpl(IPAddress.Parse(win32_IP_ADDR_STRING.IpAddress)));
intPtr = win32_IP_ADDR_STRING.Next;
}
}
// Token: 0x170002EE RID: 750
// (get) Token: 0x06000BAC RID: 2988 RVA: 0x00023D5C File Offset: 0x00021F5C
public override bool IsReadOnly
{
get
{
return this.is_readonly;
}
}
// Token: 0x04000B99 RID: 2969
public static readonly Win32GatewayIPAddressInformationCollection Empty = new Win32GatewayIPAddressInformationCollection(true);
// Token: 0x04000B9A RID: 2970
private bool is_readonly;
}
}