public BlockIndexService(IOptions <NakoApiSettings> nakoApiSettings)
        {
            _nakoApiSettings = nakoApiSettings.Value;

            // RestClient is suppose to be able to be re-used. If not, we should move this into the Execute method.
            _client         = new RestClient();
            _client.BaseUrl = new System.Uri(_nakoApiSettings.Endpoint);
        }
 public UpdateInfosService(IMemoryCache memoryCache, UpdateHub hub, IHubContext <UpdateHub> hubContext, IOptions <NakoApiSettings> nakoApiSettings, IOptions <TickerSettings> tickerSettings)
 {
     _memoryCache     = memoryCache;
     _hub             = hub;
     _hubContext      = hubContext;
     _updateTimer     = new System.Timers.Timer();
     _nakoApiSettings = nakoApiSettings.Value;
     _tickerSettings  = tickerSettings.Value;
 }
        public BlockExplorerController(IMemoryCache memoryCache,
                                       BlockIndexService indexService,
                                       IOptions <NakoApiSettings> nakoApiSettings,
                                       IOptions <SetupSettings> setupSettings,
                                       IOptions <FeaturesSettings> featuresSettings)
        {
            _memoryCache  = memoryCache;
            _stats        = JsonConvert.DeserializeObject(_memoryCache.Get("BlockchainStats").ToString());
            _indexService = indexService;

            _nakoApiSettings  = nakoApiSettings.Value;
            _setupSettings    = setupSettings.Value;
            _featuresSettings = featuresSettings.Value;
        }
Пример #4
0
 public ApiController(IMemoryCache memoryCache, IOptions <NakoApiSettings> nakoApiSettings, BlockIndexService indexService)
 {
     _memoryCache     = memoryCache;
     _nakoApiSettings = nakoApiSettings.Value;
     _indexService    = indexService;
 }
 public ApiController(IMemoryCache memoryCache, IOptions <NakoApiSettings> nakoApiSettings)
 {
     _memoryCache     = memoryCache;
     _nakoApiSettings = nakoApiSettings.Value;
 }