Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ InternalGetIsNetworkAvailable()

static bool System.Net.NetworkInformation.SystemNetworkInterface.InternalGetIsNetworkAvailable ( )
inlinestaticpackage

Definition at line 66 of file SystemNetworkInterface.cs.

67 {
68 try
69 {
70 NetworkInterface[] networkInterfaces = GetNetworkInterfaces();
71 NetworkInterface[] array = networkInterfaces;
72 foreach (NetworkInterface networkInterface in array)
73 {
74 if (networkInterface.OperationalStatus == OperationalStatus.Up && networkInterface.NetworkInterfaceType != NetworkInterfaceType.Tunnel && networkInterface.NetworkInterfaceType != NetworkInterfaceType.Loopback)
75 {
76 return true;
77 }
78 }
79 }
80 catch (NetworkInformationException message)
81 {
82 if (System.Net.NetEventSource.Log.IsEnabled())
83 {
84 System.Net.NetEventSource.Error(null, message, "InternalGetIsNetworkAvailable");
85 }
86 }
87 return false;
88 }
static readonly System.Net.NetEventSource Log
static void Error(object thisOrContextObject, FormattableString formattableString, [CallerMemberName] string memberName=null)

References System.array, System.Net.NetEventSource.Error(), System.Net.NetworkInformation.SystemNetworkInterface.GetNetworkInterfaces(), and System.Net.NetEventSource.Log.

Referenced by System.Net.NetworkInformation.NetworkChange.AvailabilityChangeListener.ChangedAddress(), and System.Net.NetworkInformation.NetworkInterfacePal.GetIsNetworkAvailable().