Exemple #1
0
        /// <summary>
        ///		Ends an asynchronous request for DNS information.
        /// </summary>
        /// <param name="AsyncResult">
        ///		An System.IAsyncResult instance returned by a call to the Heijden.Dns.Resolver.BeginGetHostAddresses(System.String,System.AsyncCallback,System.Object)
        ///		method.
        /// </param>
        /// <returns></returns>
        public IPAddress[] EndGetHostAddresses(IAsyncResult AsyncResult)
        {
            AsyncResult aResult        = (AsyncResult)AsyncResult;
            GetHostAddressesDelegate g = (GetHostAddressesDelegate)aResult.AsyncDelegate;

            return(g.EndInvoke(AsyncResult));
        }
Exemple #2
0
        /// <summary>
        ///		Asynchronously returns the Internet Protocol (IP) addresses for the specified
        ///     host.
        /// </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 BeginGetHostAddresses(string hostNameOrAddress, AsyncCallback requestCallback, object stateObject)
        {
            GetHostAddressesDelegate g = GetHostAddresses;

            return(g.BeginInvoke(hostNameOrAddress, requestCallback, stateObject));
        }
Exemple #3
0
 /// <summary>
 ///		Asynchronously returns the Internet Protocol (IP) addresses for the specified
 ///     host.
 /// </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 BeginGetHostAddresses(string hostNameOrAddress, AsyncCallback requestCallback, object stateObject)
 {
     GetHostAddressesDelegate g = new GetHostAddressesDelegate(GetHostAddresses);
     return g.BeginInvoke(hostNameOrAddress, requestCallback, stateObject);
 }