/// <summary> /// Ends an asynchronous request for DNS information. /// </summary> /// <param name="AsyncResult"> /// An System.IAsyncResult instance returned by a call to an /// Overload:Heijden.Dns.Resolver.BeginGetHostEntry method. /// </param> /// <returns> /// An System.Net.IPHostEntry instance that contains address information about /// the host. ///</returns> public IPHostEntry EndGetHostEntry(IAsyncResult AsyncResult) { AsyncResult aResult = (AsyncResult)AsyncResult; if (aResult.AsyncDelegate is GetHostEntryDelegate) { GetHostEntryDelegate g = (GetHostEntryDelegate)aResult.AsyncDelegate; return(g.EndInvoke(AsyncResult)); } if (aResult.AsyncDelegate is GetHostEntryViaIPDelegate) { GetHostEntryViaIPDelegate g = (GetHostEntryViaIPDelegate)aResult.AsyncDelegate; return(g.EndInvoke(AsyncResult)); } return(null); }
/// <summary> /// Asynchronously resolves an IP address to an System.Net.IPHostEntry instance. /// </summary> /// <param name="ip">The IP address to resolve.</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 BeginGetHostEntry(IPAddress ip, AsyncCallback requestCallback, object stateObject) { GetHostEntryViaIPDelegate g = new GetHostEntryViaIPDelegate(GetHostEntry); return(g.BeginInvoke(ip, requestCallback, stateObject)); }
/// <summary> /// Asynchronously resolves an IP address to an System.Net.IPHostEntry instance. /// </summary> /// <param name="ip">The IP address to resolve.</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 BeginGetHostEntry(IPAddress ip, AsyncCallback requestCallback, object stateObject) { GetHostEntryViaIPDelegate g = new GetHostEntryViaIPDelegate(GetHostEntry); return g.BeginInvoke(ip, requestCallback, stateObject); }