Пример #1
0
 /// <summary>
 /// Remove a specific line from an unordered topic.
 /// </summary>
 /// <param name="index">The index of the line to remove.</param>
 /// <param name="callback">The callback to notify the result.</param>
 public void RemoveUnordered(int index, ITopicUpdaterUpdateCallback callback)
 {
     Update(
         UnorderedTopic,
         unorderedUpdateFactory.Remove(index),
         callback);
 }
Пример #2
0
 /// <summary>
 /// Update a line within an unordered topic.
 /// </summary>
 /// <param name="index">The index of the line to update.</param>
 /// <param name="value">The new line value.</param>
 /// <param name="callback">The callback to notify the result.</param>
 public void UpdateUnordered(int index, string value, ITopicUpdaterUpdateCallback callback)
 {
     Update(
         OrderedTopic,
         unorderedUpdateFactory.Update(index, value),
         callback);
 }
Пример #3
0
 /// <summary>
 /// Add a line or lines to the end of an unordered topic.
 /// </summary>
 /// <param name="values">The lines to add.</param>
 /// <param name="callback">The callback to notify the result.</param>
 public void AddUnordered(ICollection <string> values, ITopicUpdaterUpdateCallback callback)
 {
     Update(
         UnorderedTopic,
         unorderedUpdateFactory.Add(values),
         callback);
 }
Пример #4
0
 /// <summary>
 /// Insert a line or lines at a specified index within an unordered topic.
 /// </summary>
 /// <param name="index">The index at which to add the line.</param>
 /// <param name="values">The lines to insert.</param>
 /// <param name="callback">The callback to notify the result.</param>
 public void InsertUnordered(int index, ICollection <string> values, ITopicUpdaterUpdateCallback callback)
 {
     Update(
         UnorderedTopic,
         unorderedUpdateFactory.Insert(index, values),
         callback);
 }
Пример #5
0
 /// <summary>
 /// Remove a line from an ordered topic.
 /// </summary>
 /// <param name="name">The name of the line to remove.</param>
 /// <param name="callback">The callback to notify the result.</param>
 public void RemoveOrdered(string name, ITopicUpdaterUpdateCallback callback)
 {
     Update(
         OrderedTopic,
         orderedUpdateFactory.Remove(Diffusion.Content.NewRecord(name, "")),
         callback);
 }
Пример #6
0
 /// <summary>
 /// Update a line of an ordered topic.
 /// </summary>
 /// <param name="name">The name of the line to update.</param>
 /// <param name="address">The new address field value.</param>
 /// <param name="callback">The callback to notify the result.</param>
 public void UpdateOrdered(string name, string address, ITopicUpdaterUpdateCallback callback)
 {
     Update(
         OrderedTopic,
         orderedUpdateFactory.Update(Diffusion.Content.NewRecord(name, address)),
         callback);
 }
Пример #7
0
        private static void Update(string topic, IUpdate update, ITopicUpdaterUpdateCallback callback)
        {
            if (_pagedUpdater == null)
            {
                throw new InvalidOperationException("The paged updater has not been initialised.");
            }

            _pagedUpdater.Update(topic, update, callback);
        }
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="callback">The callback for updates.</param>
        public ControlClientAsUpdateSource( ITopicUpdaterUpdateCallback callback )
        {
            updateCallback = callback;

            session = Diffusion.Sessions.Principal( "control" ).Password( "password" )
                .Open( "ws://diffusion.example.com;80" );

            topicControl = session.GetTopicControlFeature();
            updateControl = session.GetTopicUpdateControlFeature();
        }
Пример #9
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="callback">The callback for updates.</param>
        public ControlClientAsUpdateSource(ITopicUpdaterUpdateCallback callback)
        {
            updateCallback = callback;

            session = Diffusion.Sessions.Principal("control").Password("password")
                      .Open("ws://diffusion.example.com;80");

            topicControl  = session.GetTopicControlFeature();
            updateControl = session.GetTopicUpdateControlFeature();
        }
 /// <summary>
 /// Update a line of an ordered topic.
 /// </summary>
 /// <param name="name">The name of the line to update.</param>
 /// <param name="address">The new address field value.</param>
 /// <param name="callback">The callback to notify the result.</param>
 public void UpdateOrdered( string name, string address, ITopicUpdaterUpdateCallback callback )
 {
     Update( OrderedTopic, orderedUpdateFactory.Update( Diffusion.Content.NewRecord( name, address ) ),
         callback );
 }
 /// <summary>
 /// Remove a specific line from an unordered topic.
 /// </summary>
 /// <param name="index">The index of the line to remove.</param>
 /// <param name="callback">The callback to notify the result.</param>
 public void RemoveUnordered( int index, ITopicUpdaterUpdateCallback callback )
 {
     Update( UnorderedTopic, unorderedUpdateFactory.Remove( index ), callback );
 }
 /// <summary>
 /// Remove a line from an ordered topic.
 /// </summary>
 /// <param name="name">The name of the line to remove.</param>
 /// <param name="callback">The callback to notify the result.</param>
 public void RemoveOrdered( string name, ITopicUpdaterUpdateCallback callback )
 {
     Update( OrderedTopic, orderedUpdateFactory.Remove( Diffusion.Content.NewRecord( name, "" ) ), callback );
 }
 /// <summary>
 /// Insert a line or lines at a specified index within an unordered topic.
 /// </summary>
 /// <param name="index">The index at which to add the line.</param>
 /// <param name="values">The lines to insert.</param>
 /// <param name="callback">The callback to notify the result.</param>
 public void InsertUnordered( int index, ICollection<string> values, ITopicUpdaterUpdateCallback callback )
 {
     Update( UnorderedTopic, unorderedUpdateFactory.Insert( index, values ), callback );
 }
 /// <summary>
 /// Add a line or lines to the end of an unordered topic.
 /// </summary>
 /// <param name="values">The lines to add.</param>
 /// <param name="callback">The callback to notify the result.</param>
 public void AddUnordered( ICollection<string> values, ITopicUpdaterUpdateCallback callback )
 {
     Update(
         UnorderedTopic,
         unorderedUpdateFactory.Add( values ),
         callback );
 }
 /// <summary>
 /// Update the topic with a string value.
 /// </summary>
 /// <param name="value">The update value.</param>
 /// <param name="callback">The update callback.</param>
 public void Update(string value, ITopicUpdaterUpdateCallback callback)
 {
     updateControl.Updater.Update(Topic, value, callback);
 }
Пример #16
0
 public UpdateSource(IPriceProvider provider, ITopicUpdaterUpdateCallback callback)
 {
     thePriceProvider  = provider;
     theUpdateCallback = callback;
 }
 /// <summary>
 /// Update a line within an unordered topic.
 /// </summary>
 /// <param name="index">The index of the line to update.</param>
 /// <param name="value">The new line value.</param>
 /// <param name="callback">The callback to notify the result.</param>
 public void UpdateUnordered( int index, string value, ITopicUpdaterUpdateCallback callback )
 {
     Update( OrderedTopic, unorderedUpdateFactory.Update( index, value ), callback );
 }
 public UpdateSource( IPriceProvider provider, ITopicUpdaterUpdateCallback callback )
 {
     thePriceProvider = provider;
     theUpdateCallback = callback;
 }
        private static void Update( string topic, IUpdate update, ITopicUpdaterUpdateCallback callback )
        {
            if ( _pagedUpdater == null ) {
                throw new InvalidOperationException( "The paged updater has not been initialised." );
            }

            _pagedUpdater.Update( topic, update, callback );
        }
 /// <summary>
 /// Update the topic with a string value.
 /// </summary>
 /// <param name="value">The update value.</param>
 /// <param name="callback">The update callback.</param>
 public void Update( string value, ITopicUpdaterUpdateCallback callback )
 {
     updateControl.Updater.Update( Topic, value, callback );
 }