Export (0) Print
Expand All

ServicedComponent.CanBePooled Method

This method is called by the infrastructure before the object is put back into the pool. Override this method to vote on whether the object is put back into the pool.

Namespace:  System.EnterpriseServices
Assembly:  System.EnterpriseServices (in System.EnterpriseServices.dll)

protected internal virtual bool CanBePooled()

Return Value

Type: System.Boolean
true if the serviced component can be pooled; otherwise, false.

The following code example demonstrates the use of this method.

// This object can be pooled. 
protected override bool CanBePooled()
{
    return(true);
}

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft