A Search Proxy in .NET
Introduction We all use Internet search. Nowadays, bookmarks have become somewhat outdated, as the modern search engines are so good at finding what we want, that they have become somewhat obsolete. But, what if we need to perform a search in code? We can obviously send an HTTP request to our search engine of choice and then parse the result, but it would be useful if there was a library that could do it for us. And this is how Search.NET was born! Concepts First, let's define a contract for a search proxy in .NET. A concrete proxy implementation will be specific to a search engine, such as Google , or Bing , but the contract will be the same. Here is what I propose, a contract named ISearch : public interface ISearch { Task<SearchResult> Search(string query, CancellationToken cancellationToken = default); Task<SearchResult> Search(string query, QueryOptions options, CancellationToken cancellationToken = default); } As you can see, it has essentially o...