Ejemplo n.º 1
0
 public void Start()
 {
     if (m_Subscription != null)
     {
         throw new InvalidOperationException("Already started");
     }
     m_Subscription = m_DataBus.Subscribe <TimedData>(cb => m_DataStorage.Save(cb));
 }
 public DataTicker(IDataStorage dataStorage, IDataBus dataBus)
 {
     if (dataStorage == null)
     {
         throw new ArgumentNullException("dataStorage");
     }
     if (dataBus == null)
     {
         throw new ArgumentNullException("dataBus");
     }
     m_DataStorage  = dataStorage;
     m_Subscription = dataBus.Subscribe <TimedData>(notifyClients);
     m_HubContext   = GlobalHost.ConnectionManager.GetHubContext <DataTickerHub>();
 }