ChannelDispatcher.MaxTransactedBatchSize Propiedad

Definición

Obtiene o establece el tamaño máximo de un lote de transacción.

public:
 property int MaxTransactedBatchSize { int get(); void set(int value); };
public int MaxTransactedBatchSize { get; set; }
member this.MaxTransactedBatchSize : int with get, set
Public Property MaxTransactedBatchSize As Integer

Valor de propiedad

Tamaño máximo de un lote de transacción.

Excepciones

El valor establecido es menor que cero.

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

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

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

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);

dispatcher.MaxTransactedBatchSize = 10;
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)

dispatcher.MaxTransactedBatchSize = 10

Comentarios

La MaxTransactedBatchSize propiedad solo se puede establecer cuando la instancia de ChannelDispatcher está en estado Created , ya que es el único estado que es mutable y no se elimina.

Se aplica a