Exemple #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            //GoogleSearchFactory.CreateGoogleDesktopSearch();

            //ResultTypes Doris;

            IGoogleSearch       MySearch = GoogleSearchFactory.CreateGoogleDesktopSearch();
            IGoogleSearchResult MyResult;

            MyResult = MySearch.Search("Peter");

            String       path = "C:\\Documents and Settings\\dromischer\\desktop\\GDStest.txt";
            StreamWriter sw   = File.CreateText(path);

            sw.Write(MyResult.QueryResult);



            //dataSet1. = (System.Data.DataSet) MyResult.QueryResult;



            //MyRichTextBox.Text = MyResult.QueryResult.ToString();

            //MyRichTextBox.Lines[0] = "Doris DOris";
        }
Exemple #2
0
            public async Task <SearchResponse> Handle(GetGoogleSearchResultQuery request, CancellationToken cancellationToken)
            {
                var response = new SearchResponse();
                var result   = _search.Search(request.SearchFor, request.UrlOfInterest);

                if (result == null || !result.Any())
                {
                    return(response);
                }
                response.FoundAt       = string.Join(",", result);
                response.IsSignificant = result.Max() <= 50;
                return(response);
            }