public RateProviderFactory(IOptions <MemoryCacheOptions> cacheOptions, IHttpClientFactory httpClientFactory, CoinAverageSettings coinAverageSettings) { _httpClientFactory = httpClientFactory; _CoinAverageSettings = coinAverageSettings; _CacheOptions = cacheOptions; // We use 15 min because of limits with free version of bitcoinaverage CacheSpan = TimeSpan.FromMinutes(15.0); InitExchanges(); }
public BTCPayRateProviderFactory(IOptions <MemoryCacheOptions> cacheOptions, BTCPayNetworkProvider btcpayNetworkProvider, CoinAverageSettings coinAverageSettings) { if (cacheOptions == null) { throw new ArgumentNullException(nameof(cacheOptions)); } _CoinAverageSettings = coinAverageSettings; _Cache = new MemoryCache(cacheOptions); _CacheOptions = cacheOptions; // We use 15 min because of limits with free version of bitcoinaverage CacheSpan = TimeSpan.FromMinutes(15.0); this.btcpayNetworkProvider = btcpayNetworkProvider; InitExchanges(); }
public CoinAverageSettingsAuthenticator(CoinAverageSettings settings) { _Settings = settings; }