mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2026-01-06 00:36:32 +00:00
minor code refactoring
This commit is contained in:
@@ -570,7 +570,7 @@ namespace DnsServerSystemTrayApp
|
||||
if (nic.OperationalStatus != OperationalStatus.Up)
|
||||
continue;
|
||||
|
||||
SetNameServerIPv6(nic, new IPAddress[] { });
|
||||
SetNameServerIPv6(nic, Array.Empty<IPAddress>());
|
||||
|
||||
try
|
||||
{
|
||||
@@ -578,7 +578,7 @@ namespace DnsServerSystemTrayApp
|
||||
|
||||
if (properties.GetIPv4Properties().IsDhcpEnabled)
|
||||
{
|
||||
SetNameServerIPv4(nic, new IPAddress[] { });
|
||||
SetNameServerIPv4(nic, Array.Empty<IPAddress>());
|
||||
}
|
||||
else if (properties.GatewayAddresses.Count > 0)
|
||||
{
|
||||
@@ -586,7 +586,7 @@ namespace DnsServerSystemTrayApp
|
||||
}
|
||||
else
|
||||
{
|
||||
SetNameServerIPv4(nic, new IPAddress[] { });
|
||||
SetNameServerIPv4(nic, Array.Empty<IPAddress>());
|
||||
}
|
||||
}
|
||||
catch (NetworkInformationException)
|
||||
|
||||
Reference in New Issue
Block a user