InstanceContext.ManualFlowControlLimit 属性

定义

获取或设置实例上下文可以处理的消息数目的限制。

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

属性值

Int32

实例上下文可以处理的消息数目。

示例

Uri baseAddress = new Uri("http://localhost:8000/ServiceModelSamples/service");

// Create a ServiceHost for the CalculatorService type and provide the base address.
using (ServiceHost serviceHost = new ServiceHost(typeof(CalculatorService), baseAddress))
{
    serviceHost.Open();
    OperationContext operationContext = OperationContext.Current;
    InstanceContext instanceContext = operationContext.InstanceContext;
    instanceContext.ManualFlowControlLimit = 100;
}

注解

ManualFlowControlLimit 值为零时,将无法处理更多的消息。

适用于