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