Esempio n. 1
0
        public MediaSearchService(
            IOptions <AppSettings> appSettings,
            ILogger <MediaSearchService> logger,
            IGeoSearchHelper geoSearchHelper)
        {
            _appSettings     = appSettings.Value;
            _logger          = logger;
            _geoSearchHelper = geoSearchHelper;

            string searchServiceName        = _appSettings.SearchServiceName;
            string searchServiceQueryApiKey = _appSettings.SearchServiceQueryApiKey;
            string searchIndexName          = _appSettings.SearchIndexName;

            _searchIndexClient = new SearchIndexClient(
                searchServiceName,
                searchIndexName,
                new SearchCredentials(searchServiceQueryApiKey));

            string searchServiceAdminApiKey = _appSettings.SearchServiceAdminApiKey;

            _searchIndexAdminClient = new SearchIndexClient(
                searchServiceName,
                searchIndexName,
                new SearchCredentials(searchServiceAdminApiKey));
        }
        public WebApiController(
            IOptions <AppSettings> appSettings,
            ILogger <WebApiController> logger,
            MediaSearchService mediaSearchService,
            ItemService itemService,
            IGeoSearchHelper geoSearchHelper,
            GraphService graphService)
        {
            _appSettings        = appSettings.Value;
            _logger             = logger;
            _mediaSearchService = mediaSearchService;
            _itemService        = itemService;
            _geoSearchHelper    = geoSearchHelper;
            _graphService       = graphService;

            InitStorage();
        }