Example #1
0
        public static IPHostEntry EndGetHostByName(IAsyncResult asyncResult)
        {
            if (asyncResult == null)
            {
                throw new ArgumentNullException("asyncResult");
            }
            AsyncResult           asyncResult2          = (AsyncResult)asyncResult;
            GetHostByNameCallback getHostByNameCallback = (GetHostByNameCallback)asyncResult2.AsyncDelegate;

            return(getHostByNameCallback.EndInvoke(asyncResult));
        }
Example #2
0
        public static IPHostEntry EndGetHostByName(IAsyncResult asyncResult)
        {
            if (asyncResult == null)
            {
                throw new ArgumentNullException("asyncResult");
            }

            if (use_mono_dns)
            {
                return(EndAsyncCall(asyncResult as DnsAsyncResult));
            }

            AsyncResult           async = (AsyncResult)asyncResult;
            GetHostByNameCallback cb    = (GetHostByNameCallback)async.AsyncDelegate;

            return(cb.EndInvoke(asyncResult));
        }