/// <summary> /// Stop main thread while service thread is working /// </summary> /// <param name="result">Asynch object for manage thread</param> void IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) { googleSearcherDelegate gsd = (googleSearcherDelegate)result.AsyncState; gsd.EndInvoke(result); }
/// <summary> /// Start service user request. /// Create thread, that redirect request to google-server and return results to client /// </summary> /// <param name="Context">Connection context</param> /// <param name="cb">Callback function. Called when thread finish work</param> /// <param name="extraData">Not used</param> /// <returns>Asynch object for recive current thread state information</returns> IAsyncResult IHttpAsyncHandler.BeginProcessRequest(HttpContext Context, AsyncCallback cb, object extraData) { googleSearcherDelegate gsd = GoogleSearcher.RedirectRequestToGoogle; return(gsd.BeginInvoke(Context, cb, gsd)); }