コード例 #1
0
        public static IPHostEntry EndResolve(IAsyncResult asyncResult)
        {
            if (asyncResult == null)
            {
                throw new ArgumentNullException("asyncResult");
            }
            AsyncResult     async = (AsyncResult)asyncResult;
            ResolveCallback cb    = (ResolveCallback)async.AsyncDelegate;

            return(cb.EndInvoke(asyncResult));
        }
コード例 #2
0
        public static IPHostEntry EndResolve(IAsyncResult asyncResult)
        {
            if (asyncResult == null)
            {
                throw new ArgumentNullException("asyncResult");
            }

#if !MOBILE
            if (use_mono_dns)
            {
                return(EndAsyncCall(asyncResult as DnsAsyncResult));
            }
#endif

            AsyncResult     async = (AsyncResult)asyncResult;
            ResolveCallback cb    = (ResolveCallback)async.AsyncDelegate;
            return(cb.EndInvoke(asyncResult));
        }