Ejemplo n.º 1
0
 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();
 }
Ejemplo n.º 2
0
 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();
 }
Ejemplo n.º 3
0
 public CoinAverageSettingsAuthenticator(CoinAverageSettings settings)
 {
     _Settings = settings;
 }