ChannelDispatcher.ServiceThrottle Propiedad

Definición

Obtiene o establece el acelerador de servicio del servicio asociado al distribuidor de canal.

public:
 property System::ServiceModel::Dispatcher::ServiceThrottle ^ ServiceThrottle { System::ServiceModel::Dispatcher::ServiceThrottle ^ get(); void set(System::ServiceModel::Dispatcher::ServiceThrottle ^ value); };
public System.ServiceModel.Dispatcher.ServiceThrottle ServiceThrottle { get; set; }
member this.ServiceThrottle : System.ServiceModel.Dispatcher.ServiceThrottle with get, set
Public Property ServiceThrottle As ServiceThrottle

Valor de propiedad

Un objeto ServiceThrottle.

Excepciones

El objeto de comunicación está en un estado de Opening o Opened.

El objeto de comunicación está en un estado de Closing o Closed.

El objeto de comunicación está en un estado de Faulted.

Ejemplos

Uri baseAddress = new Uri("http://localhost:8001/Simple");
ServiceHost serviceHost = new ServiceHost(typeof(CalculatorService), baseAddress);

serviceHost.AddServiceEndpoint(
    typeof(ICalculator),
    new WSHttpBinding(),
    "CalculatorServiceObject");

serviceHost.Open();

IChannelListener icl = serviceHost.ChannelDispatchers[0].Listener;
ChannelDispatcher dispatcher = new ChannelDispatcher(icl);
ServiceThrottle throttle = dispatcher.ServiceThrottle;
Dim baseAddress As New Uri("http://localhost:8001/Simple")
Dim serviceHost As New ServiceHost(GetType(CalculatorService), baseAddress)

serviceHost.AddServiceEndpoint(GetType(ICalculator), New WSHttpBinding(), "CalculatorServiceObject")

serviceHost.Open()

Dim icl As IChannelListener = serviceHost.ChannelDispatchers(0).Listener
Dim dispatcher As New ChannelDispatcher(icl)
Dim throttle As ServiceThrottle = dispatcher.ServiceThrottle

Comentarios

Proporciona acceso a los controles utilizados para optimizar la disponibilidad y el rendimiento de un servicio.

Esta propiedad sólo se puede establecer cuando la instancia del ChannelDispatcher está en el estado de Created, puesto que éste es el único estado que es mutable y no eliminado.

Se aplica a