InstanceContext.IncrementManualFlowControlLimit(Int32) メソッド

定義

サービス インスタンスが処理できるメッセージの最大数を増やします。

public:
 int IncrementManualFlowControlLimit(int incrementBy);
public int IncrementManualFlowControlLimit (int incrementBy);
member this.IncrementManualFlowControlLimit : int -> int
Public Function IncrementManualFlowControlLimit (incrementBy As Integer) As Integer

パラメーター

incrementBy
Int32

サービス インスタンスが処理できるメッセージの最大数に加算する数。

戻り値

incrementBy が加算された後の、サービス インスタンスが処理できるメッセージの新しい制限数。

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.IncrementManualFlowControlLimit(100);
}

適用対象