StreamLink for Silverlight
Throttle Method (listener, subjectName, parameters)
StreamLink for SilverlightCaplin.StreamLinkIStreamLinkProviderThrottle(ICommandListener, String, IThrottleParameters)
Issues a command to change the throttle level of updates received from the Liberator for a particular subscribed subject (data item).
Declaration Syntax
C#Visual BasicVisual C++
void Throttle(
	ICommandListener listener,
	string subjectName,
	IThrottleParameters parameters
)
Sub Throttle ( _
	listener As ICommandListener, _
	subjectName As String, _
	parameters As IThrottleParameters _
)
void Throttle(
	ICommandListener^ listener, 
	String^ subjectName, 
	IThrottleParameters^ parameters
)
Parameters
listener (ICommandListener)
The listener that will receive the results of the throttle command.
subjectName (String)
The name of the subject (data item) for which the throttle level is to be changed.
parameters (IThrottleParameters)
The parameters of the throttle command.
Remarks
For more information on throttling see the Caplin StreamLink Overview.
Examples
CopyC#
using Caplin.StreamLink;
using Caplin.StreamLink.Authentication;
using Caplin.StreamLink.Command;
using Caplin.StreamLink.Subscription.Record;
using StreamLinkExamples.Record;

namespace StreamLinkExamples.Commands
{
    /// <summary>
    /// Throttle a Subject example
    /// </summary>
    public class ThrottleASubject
    {
        /// <summary>
        /// Example of how to throttle updates to a subject from the Liberator.
        /// </summary>
        public static void CreateThrottleASubjectExample()
        {
            IStreamLink myStreamLink = new StreamLink();
            myStreamLink.CredentialsProvider = new PasswordCredentialsProvider("admin", "admin");

            // Connect
            myStreamLink.StreamLinkProvider.Connect();

            // create a listener for record updates
            IRecordSubscriptionListener exampleRecordSubscriptionListener = new ExampleRecordSubscriptionListener();

            // subscribe to a record
            IRecordSubscriptionParameters recordParams =
                myStreamLink.StreamLinkProvider.ParametersFactory.CreateRecordSubscriptionParameters();
            IRecordSubscription sub = myStreamLink.StreamLinkProvider.CreateRecordSubscription(exampleRecordSubscriptionListener, "Subject", recordParams);
            sub.Subscribe();

            // Throttle subject, set to max level
            IThrottleParameters parameters =
                myStreamLink.StreamLinkProvider.ParametersFactory.CreateThrottleParameters(ThrottleControl.Max);

            // listener called when the throttle command has finished executing
            ICommandListener listener = new ExampleCommandListener();

            myStreamLink.StreamLinkProvider.Throttle(listener, "Subject", parameters);
        }

    }
}
See Also

Assembly: Caplin.StreamLink.Silverlight (Module: Caplin.StreamLink.Silverlight) Version: 5.0.16.0 (5.0.16.0)