Επεξεργασία

Κοινή χρήση μέσω


IInstanceContextProvider.IsIdle(InstanceContext) Method

Definition

Called when all InstanceContext activities have completed to enable implementers to prevent the InstanceContext from being recycled.

public:
 bool IsIdle(System::ServiceModel::InstanceContext ^ instanceContext);
public bool IsIdle (System.ServiceModel.InstanceContext instanceContext);
abstract member IsIdle : System.ServiceModel.InstanceContext -> bool
Public Function IsIdle (instanceContext As InstanceContext) As Boolean

Parameters

instanceContext
InstanceContext

The InstanceContext object that is considered idle.

Returns

true if Windows Communication Foundation (WCF) is to close and recycle the InstanceContext object and adjust the value of MaxConcurrentInstances; otherwise, false.

Remarks

IsIdle is called when WCF is about to close and recycle an idle InstanceContext object so that you can inform the runtime whether to continue doing so.

For an example that demonstrates the sharing of instance contexts, see InstanceContextSharing.

Applies to