Imported Upstream version 5.18.0.142

Former-commit-id: 7467d4b717762eeaf652d77f1486dd11ffb1ff1f
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-10-09 08:20:59 +00:00
parent e52655b4dc
commit 0abdbe5a7d
1547 changed files with 93792 additions and 47893 deletions

View File

@@ -14,36 +14,7 @@ namespace System.Net.NetworkInformation
{
public static IPGlobalProperties GetIPGlobalProperties()
{
#if MONODROID
return new AndroidIPGlobalProperties ();
#elif MONOTOUCH || XAMMAC
return new UnixIPGlobalProperties ();
#elif MONO
switch (Environment.OSVersion.Platform) {
case PlatformID.Unix:
MibIPGlobalProperties impl = null;
if (Directory.Exists (MibIPGlobalProperties.ProcDir)) {
impl = new MibIPGlobalProperties (MibIPGlobalProperties.ProcDir);
if (File.Exists (impl.StatisticsFile))
return impl;
}
if (Directory.Exists (MibIPGlobalProperties.CompatProcDir)) {
impl = new MibIPGlobalProperties (MibIPGlobalProperties.CompatProcDir);
if (File.Exists (impl.StatisticsFile))
return impl;
}
return new UnixIPGlobalProperties ();
default:
#if WIN_PLATFORM
return new Win32IPGlobalProperties ();
#else
return new UnixIPGlobalProperties ();
#endif
}
#else
(new NetworkInformationPermission(NetworkInformationAccess.Read)).Demand();
return new SystemIPGlobalProperties();
#endif
return IPGlobalPropertiesFactoryPal.Create ();
}
internal static IPGlobalProperties InternalGetIPGlobalProperties()