private CurrencyRateTicker(IHubConnectionContext <dynamic> clients, ICurrencyRateStorage storage) { storage_ = storage; updateInterval_ = TimeSpan.FromMilliseconds(250); random_ = new Random(); Clients = clients; // TODO: get rates from redis, store to redis timer_ = new Timer(OnTimerElapsed, null, TimeSpan.Zero, updateInterval_); }
public CurrencyRateHub() { // TODO: set up DI storage_ = new RedisCurrencyRateStorage(RedisConnectionManager.Instance); }
public CurrencyRateService(ICurrencyRateStorage storage) { CurrencyRateStorage = storage; }