public HomeController(IMemoryCache memoryCache, IAsk ask, ISettings settings, IParticipation participation, IDraws draws, IHubContext <UpdateHub> hubContext, UpdateHub hub, IOptions <DrawSettings> drawSettings, IOptions <SetupSettings> setupSettings, IOptions <FeaturesSettings> featuresSettings, IOptions <ColdStakingSettings> coldStakingSettings) { _memoryCache = memoryCache; _ask = ask; _settings = settings; _participation = participation; _draws = draws; _hub = hub; _hubContext = hubContext; _drawSettings = drawSettings.Value; _setupSettings = setupSettings.Value; _tickerSettings = tickerSettings.Value; _featuresSettings = featuresSettings.Value; _coldStakingSettings = coldStakingSettings.Value; }
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; }
/// <summary> /// Initializes data used in the test. /// </summary> public void SetUp() { TimeSpan interval = TimeSpan.FromSeconds(2); int numberOfTicks = 3; DispatcherPriority priority = DispatcherPriority.Normal; // VERY IMPORTANT!!! // For the DispatcherTimer to tick when it is not running // in a normal WPF application, you must give it a priority // higher than 'Background' (which is the default priority). // In this demo we give it a priority of 'Normal'. _settings = new TickerSettings(interval, numberOfTicks, priority); }
public DataUpdateService( BlockIndexService blockIndexService, TickerService tickerService, CurrencyService currencyService, IMemoryCache memoryCache, UpdateHub hub, IHubContext <UpdateHub> hubContext, IOptions <NakoSettings> nakoSettings, IOptions <TickerSettings> tickerSettings) { _tickerService = tickerService; _blockIndexService = blockIndexService; _memoryCache = memoryCache; _hub = hub; _hubContext = hubContext; _nakoApiSettings = nakoSettings.Value; _tickerSettings = tickerSettings.Value; _currencyService = currencyService; _nakoTimer = new System.Timers.Timer(); _tickerTimer = new System.Timers.Timer(); _currencyTimer = new System.Timers.Timer(); }
public TickerService(IMemoryCache memoryCache, IOptions <NakoSettings> nakoApiSettings, IOptions <TickerSettings> tickerSettings) : base(nakoApiSettings.Value.ApiUrl) { _memoryCache = memoryCache; _nakoApiSettings = nakoApiSettings.Value; _tickerSettings = tickerSettings.Value; }