コード例 #1
0
 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;
 }
コード例 #2
0
 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;
 }
コード例 #3
0
        /// <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);
        }
コード例 #4
0
        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();
        }
コード例 #5
0
 public TickerService(IMemoryCache memoryCache, IOptions <NakoSettings> nakoApiSettings, IOptions <TickerSettings> tickerSettings) : base(nakoApiSettings.Value.ApiUrl)
 {
     _memoryCache     = memoryCache;
     _nakoApiSettings = nakoApiSettings.Value;
     _tickerSettings  = tickerSettings.Value;
 }