System.Net.Sockets.Socket.CheckProtocolSupport();
}
-#if !NET_2_1 // global remove of async methods
+#if !MOONLIGHT // global remove of async methods
private delegate IPHostEntry GetHostByNameCallback (string hostName);
private delegate IPHostEntry ResolveCallback (string hostName);
}
#endif
-#endif // !NET_2_1: global remove of async methods
+#endif // !MOONLIGHT: global remove of async methods
#if !TARGET_JVM
[MethodImplAttribute(MethodImplOptions.InternalCall)]
}
#if NET_2_0
- public static IPHostEntry GetHostEntry (string hostNameOrAddress)
+ public
+#else
+ internal
+#endif
+ static IPHostEntry GetHostEntry (string hostNameOrAddress)
{
if (hostNameOrAddress == null)
throw new ArgumentNullException ("hostNameOrAddress");
return GetHostByName (hostNameOrAddress);
}
- public static IPHostEntry GetHostEntry (IPAddress address)
+#if NET_2_0
+ public
+#else
+ internal
+#endif
+ static IPHostEntry GetHostEntry (IPAddress address)
{
if (address == null)
throw new ArgumentNullException ("address");
return GetHostByAddressFromString (address.ToString (), false);
}
- public static IPAddress [] GetHostAddresses (string hostNameOrAddress)
+#if NET_2_0
+ public
+#else
+ internal
+#endif
+ static IPAddress [] GetHostAddresses (string hostNameOrAddress)
{
if (hostNameOrAddress == null)
throw new ArgumentNullException ("hostNameOrAddress");
return GetHostEntry (hostNameOrAddress).AddressList;
}
-#endif
#if NET_2_0
[Obsolete ("Use GetHostEntry instead")]