public BitCoinApiService(IRestService <BitCoinPriceIndexModel> consumerService, ILogger <BitCoinApiService> logger, ICacheProvider cacheProvider, IOptions <ExternalAPISettings> apiSetting) { this._consumerService = consumerService; this._logger = logger; this._cacheProvider = cacheProvider; this._apiSetting = apiSetting?.Value ?? throw new ArgumentNullException(nameof(apiSetting)); }
public CacheProvider(IMemoryCache memoryCache, IOptions <ExternalAPISettings> apiSettings) { this._memoryCache = memoryCache ?? throw new ArgumentNullException(nameof(_memoryCache)); this._apiSetting = apiSettings?.Value ?? throw new ArgumentNullException(nameof(apiSettings)); }