Upac.GoogleSiteSearch.GoogleSiteSearch.DoSearch C# (CSharp) Method

DoSearch() protected method

Does the search.
protected DoSearch ( string url ) : string
url string The URL.
return string
        protected virtual string DoSearch(string url)
        {
            string responseData = string.Empty;

            // Attempt to get the search result using the created query
            try
            {
                WebpageResponse response = WebUtility.GetWebpage(url, 10);
                if (response.StatusCode == WebpageResponseStatusCode.Ok)
                {
                    responseData = response.ResponseText;
                }
            }
            catch (WebException wex)
            {
                log.Error("An error occured while trying to perform Google SiteSearch.", wex);
            }
            catch (NotSupportedException nse)
            {
                log.Error("An error occured while trying to perform Google SiteSearch.", nse);
            }

            return responseData;
        }