示例#1
0
文件: Dns.cs 项目: runefs/Marvin
		public static IAsyncResult BeginGetHostByName (string hostName,
			AsyncCallback requestCallback, object stateObject)
		{
			if (hostName == null)
				throw new ArgumentNullException ("hostName");

			GetHostByNameCallback c = new GetHostByNameCallback (GetHostByName);
			return c.BeginInvoke (hostName, requestCallback, stateObject);
		}
示例#2
0
        public static IAsyncResult BeginGetHostByName(string hostName, AsyncCallback requestCallback, object stateObject)
        {
            if (hostName == null)
            {
                throw new ArgumentNullException("hostName");
            }
            GetHostByNameCallback getHostByNameCallback = GetHostByName;

            return(getHostByNameCallback.BeginInvoke(hostName, requestCallback, stateObject));
        }
示例#3
0
        public static IAsyncResult BeginGetHostByName(string hostName, AsyncCallback requestCallback, object stateObject)
        {
            if (hostName == null)
            {
                throw new ArgumentNullException("hostName");
            }

            if (use_mono_dns)
            {
                return(BeginAsyncCall(hostName, requestCallback, stateObject));
            }

            GetHostByNameCallback c = new GetHostByNameCallback(GetHostByName);

            return(c.BeginInvoke(hostName, requestCallback, stateObject));
        }
示例#4
0
        public static IAsyncResult BeginGetHostByName(string hostName, AsyncCallback requestCallback, object stateObject)
        {
#if FEATURE_NO_BSD_SOCKETS
            throw new PlatformNotSupportedException("System.Net.Dns:BeginGetHostByName is not supported on this platform.");
#else
            if (hostName == null)
            {
                throw new ArgumentNullException("hostName");
            }

#if !MOBILE
            if (use_mono_dns)
            {
                return(BeginAsyncCall(hostName, requestCallback, stateObject));
            }
#endif

            GetHostByNameCallback c = new GetHostByNameCallback(GetHostByName);
            return(c.BeginInvoke(hostName, requestCallback, stateObject));
#endif // FEATURE_NO_BSD_SOCKETS
        }
示例#5
0
文件: Dns.cs 项目: ItsVeryWindy/mono
		public static IAsyncResult BeginGetHostByName (string hostName, AsyncCallback requestCallback, object stateObject)
		{
#if FEATURE_NO_BSD_SOCKETS
			throw new PlatformNotSupportedException ("System.Net.Dns:BeginGetHostByName is not supported on this platform.");
#else
			if (hostName == null)
				throw new ArgumentNullException ("hostName");

#if !MOBILE
			if (use_mono_dns)
				return BeginAsyncCall (hostName, requestCallback, stateObject);
#endif

			GetHostByNameCallback c = new GetHostByNameCallback (GetHostByName);
			return c.BeginInvoke (hostName, requestCallback, stateObject);
#endif // FEATURE_NO_BSD_SOCKETS
		}