public ViewHub(IViewRepository viewRepository) { _viewRepo = viewRepository; //Task.Factory.StartNew(Publish); _streamProvider = new StreamProvider(this); _streamProvider.Initialize(); }
public ViewHub() { Console.WriteLine("hub created!"); //Task.Factory.StartNew(Publish); if (_streamProvider == null) { _streamProvider = new StreamProvider((res =>{ Clients.All.updateStockPrice(new []{res}); })); _streamProvider.Initialize(); } }