/// <summary> /// Ends an asynchronous request for DNS information. /// </summary> /// <param name="AsyncResult"> /// An System.IAsyncResult instance returned by a call to an /// Heijden.Dns.Resolver.BeginGetHostByName method. /// </param> /// <returns></returns> public IPHostEntry EndGetHostByName(IAsyncResult AsyncResult) { AsyncResult aResult = (AsyncResult)AsyncResult; GetHostByNameDelegate g = (GetHostByNameDelegate)aResult.AsyncDelegate; return(g.EndInvoke(AsyncResult)); }
/// <summary> /// Asynchronously resolves an IP address to an System.Net.IPHostEntry instance. /// </summary> /// <param name="hostName">The DNS name of the host</param> /// <param name="requestCallback">An System.AsyncCallback delegate that references the method to invoke when the operation is complete.</param> /// <param name="stateObject"> /// A user-defined object that contains information about the operation. This /// object is passed to the requestCallback delegate when the operation is complete. /// </param> /// <returns>An System.IAsyncResult instance that references the asynchronous request.</returns> public IAsyncResult BeginGetHostByName(string hostName, AsyncCallback requestCallback, object stateObject) { GetHostByNameDelegate g = new GetHostByNameDelegate(GetHostByName); return(g.BeginInvoke(hostName, requestCallback, stateObject)); }
/// <summary> /// Asynchronously resolves an IP address to an System.Net.IPHostEntry instance. /// </summary> /// <param name="hostName">The DNS name of the host</param> /// <param name="requestCallback">An System.AsyncCallback delegate that references the method to invoke when the operation is complete.</param> /// <param name="stateObject"> /// A user-defined object that contains information about the operation. This /// object is passed to the requestCallback delegate when the operation is complete. /// </param> /// <returns>An System.IAsyncResult instance that references the asynchronous request.</returns> public IAsyncResult BeginGetHostByName(string hostName, AsyncCallback requestCallback, object stateObject) { GetHostByNameDelegate g = new GetHostByNameDelegate(GetHostByName); return g.BeginInvoke(hostName, requestCallback, stateObject); }