/// <summary>
 /// State notification that this source is now active for the specified topic path, and is therefore in a
 /// valid state to send updates on topics at or below the registered topic path.
 /// </summary>
 /// <param name="topicPath">The registration path.</param>
 /// <param name="updater">An updater that may be used to update topics at or below the registered path.</param>
 public override void OnActive(string topicPath, ITopicUpdater updater)
 {
     PeriodicTaskFactory.Start(() => {
         updater.Update(
             TopicName, Diffusion.Content.NewContent(thePriceProvider.Price), theUpdateCallback);
     }, 1000, cancelToken: cancellationToken.Token);
 }
Esempio n. 2
0
 /// <summary>
 /// State notification that this source is now active for the specified topic path, and is therefore in a
 /// valid state to send updates on topics at or below the registered topic path.
 /// </summary>
 /// <param name="topicPath">The registration path.</param>
 /// <param name="updater">An updater that may be used to update topics at or below the registered path.</param>
 public override void OnActive(string topicPath, ITopicUpdater updater)
 {
     theUpdater = updater;
 }
Esempio n. 3
0
 public TopicUpdateSource(ITopicUpdater updater)
 {
     theUpdater = updater;
 }
 /// <summary>
 /// State notification that this source is now active for the specified topic path, and is therefore in a
 /// valid state to send updates on topics at or below the registered topic path.
 /// </summary>
 /// <param name="topicPath">The registration path.</param>
 /// <param name="updater">An updater that may be used to update topics at or below the registered path.</param>
 public override void OnActive( string topicPath, ITopicUpdater updater )
 {
     _pagedUpdater = updater;
 }
Esempio n. 5
0
 public override void OnActive(string topicPath, ITopicUpdater updater)
 {
     valueUpdater = updater.ValueUpdater <IJSON>();
 }
 /// <summary>
 /// State notification that this source is now active for the specified topic path, and is therefore in a
 /// valid state to send updates on topics at or below the registered topic path.
 /// </summary>
 /// <param name="topicPath">The registration path.</param>
 /// <param name="updater">An updater that may be used to update topics at or below the registered path.</param>
 public override void OnActive( string topicPath, ITopicUpdater updater )
 {
     PeriodicTaskFactory.Start( () => {
         updater.Update(
             TopicName, Diffusion.Content.NewContent( thePriceProvider.Price ), theUpdateCallback );
     }, 1000, cancelToken: cancellationToken.Token );
 }
 public TopicUpdateSource( ITopicUpdater updater )
 {
     theUpdater = updater;
 }
 public override void OnActive( string topicPath, ITopicUpdater updater )
 {
     valueUpdater = updater.ValueUpdater<IJSON>();
 }