예제 #1
0
파일: Searcher.cs 프로젝트: tsl555/First
    /// <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);
    }
예제 #2
0
파일: Searcher.cs 프로젝트: tsl555/First
    /// <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));
    }