// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AdCorsDefault(); services.AddJsonDefault(); services.AddRouting(); services.Configure <SearchSettings>(Configuration.GetSection("SearchSettings")); services.AddMemoryCache(); services.AddScoped <IHttpApiClient, HttpApiClient>(); services.AddScoped <ISearchRequstValidator, SearchRequstValidator>(); services.AddScoped <IBingBotService, BingBotService>(); services.AddScoped <IGoogleBotService, GoogleBotService>(); services.AddScoped <IBotProvider, BotProvider>(); services.AddScoped <IParallelBotService, ParallelBotService>(); services.AddSwaggerGen(); }