Download Diffusion 5.5 User Guide - Documentation

Transcript
{
updater.Update(
TopicName,
Diffusion.Content.NewContent( thePriceProvider.Price ),
theUpdateCallback );
}, 1000, cancelToken:cancellationToken.Token );
}
/// <summary>
/// Called if the handler is closed. The handler will be
closed if the
/// session is closed after the handler has been registered,
or if the
/// handler is unregistered using <see
cref="IRegistration.Close">close</see>.
///
/// No further calls will be made for the handler.
/// </summary>
/// <param name="topicPath">the branch of the topic tree for
which the handler was registered</param>
public override void OnClose( string topicPath )
{
cancellationToken.Cancel();
}
#endregion Overrides
}
#endregion Private Classes
#region Interfaces
public interface IPriceProvider
{
/// <summary>
/// Get the current price as a decimal string.
/// </summary>
string Price { get; }
}
#endregion Interfaces
}
}
The following example shows using the .NET Unified API to update paged topics.
using System;
using System.Collections.Generic;
using PushTechnology.ClientInterface.Client.Factories;
using
PushTechnology.ClientInterface.Client.Features.Control.Topics;
using PushTechnology.ClientInterface.Client.Session;
using PushTechnology.ClientInterface.Client.Topics;
using PushTechnology.ClientInterface.Client.Topics.Update;
namespace UCIStack.Examples
{
/// <summary>
/// An example of using a control client to create and update
paged topics.
///
Diffusion | 442