public SearchClient(SearchConfig config) { Config = config; Engines = GetAllEngines() .Where(e => Config.SearchEngines.HasFlag(e.Engine)) .ToArray(); if (!Engines.Any()) { throw new ArgumentException("No engines specified"); } Results = new(); }
public SearchClient(SearchConfig config) { Config = config; //Engines = GetAllEngines() // .Where(e => Config.SearchEngines.HasFlag(e.Engine)) // .ToArray(); //if (!Engines.Any()) { // throw new SmartImageException("No engines specified"); //} Results = new List <SearchResult>(); }