Exemple #1
0
        public ApiService(HttpClient httpClient,
                          ILogger <ApiService> logger,
                          IOptions <CinemaServicesOptions> genericSettings,
                          IMemoryCache memoryCache)
        {
            var lazyHttpClient = new Lazy <HttpClient>(() => httpClient);

            genericSettings.Value.Names.ForEach(n =>
                                                MovieServices.Add(n, new MovieRepository(n, lazyHttpClient, logger, memoryCache)));
        }