コード例 #1
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)
 {
     PeriodicTaskFactory.Start(() => {
         updater.Update(
             TopicName, Diffusion.Content.NewContent(thePriceProvider.Price), theUpdateCallback);
     }, 1000, cancelToken: cancellationToken.Token);
 }
コード例 #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;
 }
コード例 #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;
 }
コード例 #5
0
 public override void OnActive(string topicPath, ITopicUpdater updater)
 {
     valueUpdater = updater.ValueUpdater <IJSON>();
 }
コード例 #6
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 )
 {
     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>();
 }