/// <summary> /// Asynchronously resolves a host name or IP address to an System.Net.IPHostEntry instance. /// </summary> /// <param name="hostNameOrAddress">The host name or 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(string hostNameOrAddress, AsyncCallback requestCallback, object stateObject) { GetHostEntryDelegate g = new GetHostEntryDelegate(GetHostEntry); return(g.BeginInvoke(hostNameOrAddress, requestCallback, stateObject)); }
/// <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 a host name or IP address to an System.Net.IPHostEntry instance. /// </summary> /// <param name="hostNameOrAddress">The host name or 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(string hostNameOrAddress, AsyncCallback requestCallback, object stateObject) { GetHostEntryDelegate g = new GetHostEntryDelegate(GetHostEntry); return g.BeginInvoke(hostNameOrAddress, requestCallback, stateObject); }
public AsyncStateForIP(GetHostEntryDelegate resolveMethod, StoreHostIPDelegate storeResultMethod) : base(resolveMethod) { _storeResultMethod = storeResultMethod; }
public AsyncStateUni(GetHostEntryDelegate resolveMethod) { _resolveMethod = resolveMethod; }