private static void Run() { Console.Write("Enter search term: "); string query = Console.ReadLine(); Console.Write("Which URL do you want to search: "); string urlToSearch = Console.ReadLine(); if (!String.IsNullOrEmpty(urlToSearch)) { GoogleSearchAPI searchAPI = new GoogleSearchAPI(query, urlToSearch); DisplayResults(searchAPI.QueryResults(), query); Console.WriteLine("Press any key to continue..."); Console.ReadLine(); } }
public SearchController(IOptions <GoogleSearchAPI> optionsAccessor) { googleSearchAPI = optionsAccessor.Value; }